Module: Mesa
Branch: main
Commit: d31e5c8efc18ca78f88b56398da9fa49b4a734f9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d31e5c8efc18ca78f88b56398da9fa49b4a734f9

Author: Rhys Perry <[email protected]>
Date:   Tue Oct 25 15:55:22 2022 +0100

radv/gfx11: don't create fmask copy/expand pipelines

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19375>

---

 src/amd/vulkan/radv_meta.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c
index 610b089e64d..f20df892674 100644
--- a/src/amd/vulkan/radv_meta.c
+++ b/src/amd/vulkan/radv_meta.c
@@ -450,9 +450,15 @@ radv_device_init_meta(struct radv_device *device)
    if (result != VK_SUCCESS)
       goto fail_resolve_fragment;
 
-   result = radv_device_init_meta_fmask_expand_state(device);
-   if (result != VK_SUCCESS)
-      goto fail_fmask_expand;
+   if (device->physical_device->rad_info.gfx_level < GFX11) {
+      result = radv_device_init_meta_fmask_expand_state(device);
+      if (result != VK_SUCCESS)
+         goto fail_fmask_expand;
+
+      result = radv_device_init_meta_fmask_copy_state(device);
+      if (result != VK_SUCCESS)
+         goto fail_fmask_copy;
+   }
 
    if (radv_enable_rt(device->physical_device, false)) {
       result = radv_device_init_accel_struct_build_state(device);
@@ -460,10 +466,6 @@ radv_device_init_meta(struct radv_device *device)
          goto fail_accel_struct_build;
    }
 
-   result = radv_device_init_meta_fmask_copy_state(device);
-   if (result != VK_SUCCESS)
-      goto fail_fmask_copy;
-
    result = radv_device_init_meta_etc_decode_state(device, on_demand);
    if (result != VK_SUCCESS)
       goto fail_etc_decode;
@@ -482,10 +484,10 @@ fail_dgc:
    radv_device_finish_dgc_prepare_state(device);
 fail_etc_decode:
    radv_device_finish_meta_etc_decode_state(device);
-fail_fmask_copy:
-   radv_device_finish_meta_fmask_copy_state(device);
 fail_accel_struct_build:
    radv_device_finish_accel_struct_build_state(device);
+fail_fmask_copy:
+   radv_device_finish_meta_fmask_copy_state(device);
 fail_fmask_expand:
    radv_device_finish_meta_fmask_expand_state(device);
 fail_resolve_fragment:

Reply via email to