glsl: fix indirect tess factor access for compact_arrays=false drivers
Driver with compact_arrays=false (i.e. radeonsi) is broken when tess factor is accessed indirectly, for example: gl_TessLevelOuter[gl_InvocationID] = xxx; This fix use nir_vectorize_tess_levels to lower array tess factor access into direct vector access before nir_lower_io() like clip and cull distance way. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29799>
This commit is contained in:
@@ -68,7 +68,3 @@ spec@!opengl 1.1@line-smooth-stipple,Fail
|
||||
spec@arb_viewport_array@display-list,Fail
|
||||
# since transition XORG -> WESTON
|
||||
glx@glx_arb_sync_control@waitformsc,Fail
|
||||
|
||||
# uprev Piglit in Mesa
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
|
||||
|
@@ -150,9 +150,6 @@ glx@glx_arb_sync_control@waitformsc,Fail
|
||||
# remove these after updating piglit:
|
||||
spec@arb_fragment_layer_viewport@layer-gs-writes-out-of-range,Fail
|
||||
|
||||
# uprev Piglit in Mesa
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
|
||||
# These are dEQP bugs. See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10361
|
||||
dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_geo_fragment.block_array.float_struct,Fail
|
||||
dEQP-GLES31.functional.program_interface_query.uniform.referenced_by_shader.vertex_geo_fragment_only_vertex.default_block.float,Fail
|
||||
|
@@ -38,6 +38,3 @@ spec@khr_texture_compression_astc@miptree-gles srgb-fp,Fail
|
||||
spec@khr_texture_compression_astc@miptree-gles srgb-fp@sRGB decode full precision,Fail
|
||||
spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp,Fail
|
||||
spec@khr_texture_compression_astc@sliced-3d-miptree-gles srgb-fp@sRGB decode full precision,Fail
|
||||
|
||||
# Introduced by a piglit uprev: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25449
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
|
@@ -1351,6 +1351,7 @@ prelink_lowering(const struct gl_constants *consts,
|
||||
|
||||
if (!nir->options->compact_arrays) {
|
||||
NIR_PASS(_, nir, nir_lower_clip_cull_distance_to_vec4s);
|
||||
NIR_PASS(_, nir, nir_vectorize_tess_levels);
|
||||
}
|
||||
|
||||
/* Combine clip and cull outputs into one array and set:
|
||||
|
@@ -17,7 +17,6 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
|
||||
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@egl_chromium_sync_control@conformance,Fail
|
||||
spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_msc_and_sbc_test,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
|
|
@@ -26,7 +26,6 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
|
||||
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@arb_texture_multisample@sample-position@8,Fail
|
||||
spec@arb_viewport_array@display-list,Fail
|
||||
spec@egl_ext_protected_content@conformance,Fail
|
||||
|
|
@@ -17,7 +17,7 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
|
||||
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@egl_ext_protected_content@conformance,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@glsl-1.20@compiler@invalid-vec4-array-to-vec3-array-conversion.vert,Fail
|
||||
spec@glsl-es-3.00@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
|
|
@@ -85,7 +85,6 @@ spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8I- swizzled-
|
||||
spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8UI- swizzled- border color only,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled@GL_RGB10_A2UI- swizzled- border color only,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
|
|
@@ -85,7 +85,6 @@ spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8I- swizzled-
|
||||
spec@arb_texture_rg@texwrap formats-int bordercolor-swizzled@GL_RG8UI- swizzled- border color only,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled,Fail
|
||||
spec@arb_texture_rgb10_a2ui@texwrap formats bordercolor-swizzled@GL_RGB10_A2UI- swizzled- border color only,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y212,Fail
|
||||
|
|
@@ -33,7 +33,6 @@ spec@arb_program_interface_query@arb_program_interface_query-getprogramresourcei
|
||||
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@fs-packhalf2x16,Fail
|
||||
spec@arb_shading_language_packing@execution@built-in-functions@vs-packhalf2x16,Fail
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
spec@egl_ext_protected_content@conformance,Fail
|
||||
spec@ext_framebuffer_blit@fbo-blit-check-limits,Fail
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-sample_y210,Fail
|
||||
|
|
@@ -128,7 +128,3 @@ spec@!opengl 1.1@line-smooth-stipple,Fail
|
||||
|
||||
# fails after Debian bookworm update
|
||||
spec@arb_viewport_array@display-list,Fail
|
||||
|
||||
# uprev Piglit in Mesa
|
||||
spec@arb_tessellation_shader@execution@tesslevels-indirect,Crash
|
||||
|
||||
|
Reference in New Issue
Block a user