Lionel Landwerlin
7c6faa1efe
intel/aux_map: introduce ref count of L1 entries
...
To implement this feature, we need to do CPU side tracking of all
L3/L2/L1 entries. This does add a little bit of CPU allocations, but
the advantage is that the traversal of the page table tree is faster.
No more need for the linear seach of find_buffer().
With this feature, we can have multiple VkImage bind to the same main
memory address, as long as they share exact same mapping parameters.
The AUX mapping will be removed when the last VkImage is destroyed.
As previously, if the L1 mapping entry parameters don't match, the
mapping fails. Anv handles this nicely by just disabling AUX on the
image.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335 >
2023-11-28 16:13:11 +00:00
Nanley Chery
b1a14fe923
intel: Return a bool from intel_aux_map_add_mapping
...
Make intel_aux_map_add_mapping return false if a mapping is attempted
that would conflict with an existing one. If this function doesn't
return false, it will either fail to return or return true.
The Vulkan driver will make use of this feature to opportunistically
enable CCS if a BO's VMA range has not been already mapped.
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003 >
2023-10-23 21:37:24 +00:00
José Roberto de Souza
47792b3642
intel/aux_map: Rename some variables to improve readability
...
No changes in behavior here, mostly doing this types of renames:
- address to main_address, to know that addresses refers to main
surface address or aux surface address
- gpu to addr
- main_map_addr to main_inc_addr
- aux_dest_addr to aux_inc_addr
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24077 >
2023-07-19 16:53:59 +00:00
Lionel Landwerlin
195fbffac8
intel: add alignment helper for aux map
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Tested-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23198 >
2023-05-26 12:58:13 +00:00
Jianxun Zhang
c14857e915
intel/common: clean up AUX macros
...
The hardcoded is either replaced with new interfaces or relocated
to C file if it is private.
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20259 >
2022-12-14 18:11:13 +00:00
Jianxun Zhang
cf3ee73f8f
intel/common: fix style of some comments in intel_aux_map.h
...
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20167 >
2022-12-09 09:49:42 +00:00
Jianxun Zhang
d0520430aa
intel/common: Add a new struct to describe AUX mapping format
...
The new struct and some helper functions are for further
refactoring.
Reworks:
* Jordan: Refactor code around aux format array
Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20167 >
2022-12-09 09:49:42 +00:00
Anuj Phogat
4f42b28cc3
intel: Rename gen_{mapped, clflush, invalidate} prefix to intel_{..}
...
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965
grep -E "gen_" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_\(mapped\|clflush\|invalidate\|shader\)/intel_\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241 >
2021-04-20 20:06:34 +00:00
Anuj Phogat
61e8636557
intel: Rename gen_device prefix to intel_device
...
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241 >
2021-04-20 20:06:33 +00:00
Anuj Phogat
e7e55af4d6
intel: Rename GENx keyword to GFXx
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "GEN[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/GEN\([[:digit:]]\+\)/GFX\1/g"
Exclude the changes to modifiers:
grep -E "I915_.*GFX" -rIl $SEARCH_PATH | xargs sed -ie "s/\(I915_.*\)GFX/\1GEN/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
96e251bde7
intel: Rename "GEN_" prefix used in common code to "INTEL_"
...
This patch renames all macros with "GEN_" prefix defined in
common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
65d7f52098
intel: Fix broken alignment due to gen_ prefix renaming
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
692472a376
intel: Rename "gen_" prefix used in common code to "intel_"
...
This patch renames functions, structures, enums etc. with "gen_"
prefix defined in common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
733b0ee8cb
intel: Rename files with gen_ prefix in common code to intel_
...
Changes in this patch include:
- Rename all files in src/intel/common path
- Update the filenames used in source and build files
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00