glsl: drop the dce of global vars from GLSL IR linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 5 Apr 2023 02:30:24 +0000 (12:30 +1000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Jul 2023 01:21:06 +0000 (01:21 +0000)
All this does is compilcate things such as forcing us to set
var->data.always_active_io in the glsl linker. Just let NIR clean
these up for us instead.

A Zink test hits a new assert but this is not a regression it just
uncovers an existing mesa bug.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22846>

src/compiler/glsl/glsl_parser_extras.cpp
src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt

index 78abf5f..8795b0a 100644 (file)
@@ -2442,10 +2442,7 @@ do_common_optimization(exec_list *ir, bool linked,
    if (options->OptimizeForAOS && !linked)
       OPT(opt_flip_matrices, ir);
 
-   if (linked)
-      OPT(do_dead_code, ir);
-   else
-      OPT(do_dead_code_unlinked, ir);
+   OPT(do_dead_code_unlinked, ir);
    OPT(do_dead_code_local, ir);
    OPT(do_tree_grafting, ir);
    OPT(do_minmax_prune, ir);
index 6c30e40..dcf8f5a 100644 (file)
@@ -21,6 +21,9 @@ spec@arb_query_buffer_object@qbo@query-GL_GEOMETRY_SHADER_INVOCATIONS-SYNC-GL_UN
 glx@glx-multi-window-single-context,Crash
 spec@egl_chromium_sync_control@conformance@eglGetSyncValuesCHROMIUM_ust_test,Fail
 
+# Mesa bug not Zink bug. See piglit MR 824
+spec@arb_bindless_texture@compiler@images@return-struct.frag,Crash
+
 # #6115
 spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-float-index-rd,Crash
 spec@arb_tessellation_shader@execution@variable-indexing@tes-both-input-array-vec2-index-rd,Crash