Mesa (staging/21.3): v3dv/pipeline: don't clone the nir shader at pipeline_state_create_binning

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Nov 7 13:39:51 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 8daa81531db6bd926bb4a04553a297aa4bfaeee0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8daa81531db6bd926bb4a04553a297aa4bfaeee0

Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date:   Tue Oct 12 23:33:43 2021 +0200

v3dv/pipeline: don't clone the nir shader at pipeline_state_create_binning

At that point we didn't call all the v3dv lowerings. So the reference
nir shader used to call the v3d compiler could be different.

Note that at that point the nir shader is only available for internal
shaders (like gs multiview).

This specifically affected multiview tests that wrote gl_PointSize, as
the nir shader for the geometry shader were wrongly exposing
per_vertex_point_size as false, as we were basing our check on the
nir_shader_info, and that was gathered calling nir_shader_gather_info
at pipeline_lower_nir.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13325>
(cherry picked from commit 19894bec1fdd85b394c71442854878db2a51ee71)

---

 .pick_status.json                        |  2 +-
 src/broadcom/ci/deqp-v3dv-rpi4-fails.txt | 27 ---------------------------
 src/broadcom/vulkan/v3dv_pipeline.c      |  6 +++++-
 3 files changed, 6 insertions(+), 29 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 27a1c508b85..992a9be3141 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -6223,7 +6223,7 @@
         "description": "v3dv/pipeline: don't clone the nir shader at pipeline_state_create_binning",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/broadcom/ci/deqp-v3dv-rpi4-fails.txt b/src/broadcom/ci/deqp-v3dv-rpi4-fails.txt
index 7898bc2a2d1..6379afbe3df 100644
--- a/src/broadcom/ci/deqp-v3dv-rpi4-fails.txt
+++ b/src/broadcom/ci/deqp-v3dv-rpi4-fails.txt
@@ -3,30 +3,3 @@ dEQP-VK.geometry.input.basic_primitive.line_strip_adjacency,Fail
 
 # CTS bug; fix submitted
 dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_geom,Fail
-
-# Multiview doesn't work with points
-dEQP-VK.multiview.point_size.15,Fail
-dEQP-VK.multiview.point_size.8,Fail
-dEQP-VK.multiview.point_size.1_2_4_8,Fail
-dEQP-VK.multiview.point_size.15_15_15_15,Fail
-dEQP-VK.multiview.point_size.8_1_1_8,Fail
-dEQP-VK.multiview.point_size.5_10_5_10,Fail
-dEQP-VK.multiview.point_size.1_2_4_8_16_32,Fail
-dEQP-VK.multiview.point_size.max_multi_view_view_count,Fail
-
-dEQP-VK.draw.instanced.draw_vk_primitive_topology_point_list_attrib_divisor_1_multiview,Fail
-dEQP-VK.draw.instanced.draw_vk_primitive_topology_point_list_attrib_divisor_2_multiview,Fail
-dEQP-VK.draw.instanced.draw_vk_primitive_topology_point_list_attrib_divisor_4_multiview,Fail
-dEQP-VK.draw.instanced.draw_vk_primitive_topology_point_list_attrib_divisor_20_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_vk_primitive_topology_point_list_attrib_divisor_1_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_vk_primitive_topology_point_list_attrib_divisor_2_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_vk_primitive_topology_point_list_attrib_divisor_4_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_vk_primitive_topology_point_list_attrib_divisor_20_multiview,Fail
-dEQP-VK.draw.instanced.draw_indirect_vk_primitive_topology_point_list_attrib_divisor_1_multiview,Fail
-dEQP-VK.draw.instanced.draw_indirect_vk_primitive_topology_point_list_attrib_divisor_2_multiview,Fail
-dEQP-VK.draw.instanced.draw_indirect_vk_primitive_topology_point_list_attrib_divisor_4_multiview,Fail
-dEQP-VK.draw.instanced.draw_indirect_vk_primitive_topology_point_list_attrib_divisor_20_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_point_list_attrib_divisor_1_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_point_list_attrib_divisor_2_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_point_list_attrib_divisor_4_multiview,Fail
-dEQP-VK.draw.instanced.draw_indexed_indirect_vk_primitive_topology_point_list_attrib_divisor_20_multiview,Fail
diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index 85932f399cd..daa6c75501b 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -1412,7 +1412,11 @@ pipeline_stage_create_binning(const struct v3dv_pipeline_stage *src,
    p_stage->stage = bin_stage;
    p_stage->entrypoint = src->entrypoint;
    p_stage->module = src->module;
-   p_stage->nir = src->nir ? nir_shader_clone(NULL, src->nir) : NULL;
+   /* For binning shaders we will clone the NIR code from the corresponding
+    * render shader later, when we call pipeline_compile_xxx_shader. This way
+    * we only have to run the relevant NIR lowerings once for render shaders
+    */
+   p_stage->nir = NULL;
    p_stage->spec_info = src->spec_info;
    p_stage->feedback = (VkPipelineCreationFeedbackEXT) { 0 };
    memcpy(p_stage->shader_sha1, src->shader_sha1, 20);



More information about the mesa-commit mailing list