intel/vulkan: Remove private binding on fast clear region
To support modifiers with fast clear color, the region should be able to export along with main surface, so we remove the private binding in such case. Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com> Acked-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25651>
This commit is contained in:
@@ -639,8 +639,12 @@ add_aux_state_tracking_buffer(struct anv_device *device,
|
||||
* processes with access to the memory may not be aware of it or of
|
||||
* its current state. So put that auxiliary data into a separate
|
||||
* buffer (ANV_IMAGE_MEMORY_BINDING_PRIVATE).
|
||||
*
|
||||
* But when the image is created with a drm modifier that supports
|
||||
* clear color, it will be exported along with main surface.
|
||||
*/
|
||||
if (anv_image_is_externally_shared(image)) {
|
||||
if (anv_image_is_externally_shared(image)
|
||||
&& !isl_drm_modifier_get_info(image->vk.drm_format_mod)->supports_clear_color) {
|
||||
binding = ANV_IMAGE_MEMORY_BINDING_PRIVATE;
|
||||
}
|
||||
|
||||
@@ -1117,8 +1121,12 @@ check_memory_bindings(const struct anv_device *device,
|
||||
* processes with access to the memory may not be aware of it or of
|
||||
* its current state. So put that auxiliary data into a separate
|
||||
* buffer (ANV_IMAGE_MEMORY_BINDING_PRIVATE).
|
||||
*
|
||||
* But when the image is created with a drm modifier that supports
|
||||
* clear color, it will be exported along with main surface.
|
||||
*/
|
||||
if (anv_image_is_externally_shared(image)) {
|
||||
if (anv_image_is_externally_shared(image)
|
||||
&& !isl_drm_modifier_get_info(image->vk.drm_format_mod)->supports_clear_color) {
|
||||
binding = ANV_IMAGE_MEMORY_BINDING_PRIVATE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user