From 4cfa188db62dadca3342f3d6b02379b190745733 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 2 Dec 2025 17:18:50 -0500 Subject: [PATCH] tu: Stop setting view_index_is_input glslang apparently emits ViewID as a signed integer. If other passes generate a sysval then lower_sysvals_to_varyings() tries to create an variable with unsigned type and asserts when the preexisting varying's type doesn't match the type it expects. Just make ViewID a sysval and lower it in lower_sysvals_to_varyings() to avoid this and simplify the SPIR-V parser. Fixes: 5bbbf5cf9ba ("tu: Set use_layer_id_sysval for nir_lower_input_attachments") Part-of: --- src/freedreno/vulkan/tu_shader.cc | 8 +------- src/gallium/drivers/zink/ci/zink-tu-a750-fails.txt | 4 ---- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/freedreno/vulkan/tu_shader.cc b/src/freedreno/vulkan/tu_shader.cc index 741b24e348e..2e0014daa2f 100644 --- a/src/freedreno/vulkan/tu_shader.cc +++ b/src/freedreno/vulkan/tu_shader.cc @@ -204,16 +204,10 @@ tu_spirv_to_nir(struct tu_device *dev, const nir_shader_compiler_options *nir_options = ir3_get_compiler_options(dev->compiler); - spirv_to_nir_options spirv_options = tu_spirv_options; - /* ViewID is a sysval in geometry stages and an input in the FS */ - spirv_options.view_index_is_input = - stage == MESA_SHADER_FRAGMENT && - !key->lower_view_index_to_device_index; - nir_shader *nir; VkResult result = vk_pipeline_shader_stage_to_nir(&dev->vk, pipeline_flags, stage_info, - &spirv_options, nir_options, + &tu_spirv_options, nir_options, mem_ctx, &nir); if (result != VK_SUCCESS) return NULL; diff --git a/src/gallium/drivers/zink/ci/zink-tu-a750-fails.txt b/src/gallium/drivers/zink/ci/zink-tu-a750-fails.txt index 7794b7b2fc4..8df6c6e7767 100644 --- a/src/gallium/drivers/zink/ci/zink-tu-a750-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-tu-a750-fails.txt @@ -189,10 +189,6 @@ spec@glsl-1.50@execution@geometry@point-size-out,Fail spec@glsl-1.50@execution@geometry@primitive-id-restart gl_line_strip_adjacency other,Fail spec@glsl-1.50@execution@redeclare-pervertex-out-subset-gs,Fail spec@glsl-1.50@execution@variable-indexing@gs-output-array-vec4-index-wr,Fail -spec@ovr_multiview2@triangle_compare_frag_index_uniform,Fail -spec@ovr_multiview2@triangle_compare_frag_index_uniform_base2,Fail -spec@ovr_multiview2@triangle_compare_frag_vary_color,Fail -spec@ovr_multiview2@triangle_compare_frag_vary_color_base2,Fail spec@glsl-3.30@built-in constants,Fail spec@glsl-3.30@built-in constants@gl_MaxFragmentInputComponents,Fail