Module: Mesa
Branch: staging/21.2
Commit: f46692422e5eb1c6e27a4c433f8f5edd57e2106f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f46692422e5eb1c6e27a4c433f8f5edd57e2106f

Author: Rhys Perry <[email protected]>
Date:   Mon Sep  6 18:21:46 2021 +0100

radv: don't require a GS copy shader to use the cache with NGG VS+GS

Fixes 
dEQP-VK.pipeline.cache.no_cache_control.readwrite_cache.pipeline_from_get_data.vertex_stage_geometry_stage_fragment_stage

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Fixes: 7e664a53835 ("radv: Don't generate GS copy shader when the pipeline has 
NGG.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12741>
(cherry picked from commit 59084f05fc8ba6aa3b8fb0221792da3ab050784c)

---

 .pick_status.json              | 2 +-
 src/amd/vulkan/radv_pipeline.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3352b66cf49..113e62d0dcc 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -553,7 +553,7 @@
         "description": "radv: don't require a GS copy shader to use the cache 
with NGG VS+GS",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "7e664a538355018a16ef60ecf8aaef304a25aa59"
     },
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 9fd261a670f..bef9e05ab20 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -3298,7 +3298,8 @@ radv_create_shaders(struct radv_pipeline *pipeline, 
struct radv_device *device,
    if (!keep_executable_info &&
        radv_create_shader_variants_from_pipeline_cache(device, cache, hash, 
pipeline->shaders,
                                                        
&found_in_application_cache) &&
-       (!modules[MESA_SHADER_GEOMETRY] || pipeline->gs_copy_shader)) {
+       (!modules[MESA_SHADER_GEOMETRY] || pipeline->gs_copy_shader ||
+        pipeline->shaders[MESA_SHADER_GEOMETRY]->info.is_ngg)) {
       radv_stop_feedback(pipeline_feedback, found_in_application_cache);
       return VK_SUCCESS;
    }

Reply via email to