mesa/src/compiler
Jason Ekstrand 7cedc4128a spirv: Run repair_ssa if there are discard instructions
SPIR-V's OpKill is a control-flow instruction but NIR's discard is not.
Therefore, it can be valid SPIR-V to have

    if (...) {
        foo = /* something */
    } else {
        discard;
    }
    use(foo);

without any phi between the definition of foo and its use.  This is not
true in NIR, however, because NIR's discard isn't considered
control-flow.  Arguably, this is a NIR bug but making discard control-
flow is a very deep change that can have serious ans subtle
side-effects.   The easier thing to do is just fix up the SSA in case we
have an OpKill which might have gotten us into the above case.

Fixes dEQP-VK.graphicsfuzz.vectors-and-discard-in-function with the new
NIR dominance validation pass enabled.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5288>
2020-09-08 19:44:01 +00:00
..
glsl glsl_to_nir: fix crashes with int16 shifts 2020-09-06 06:35:31 -04:00
nir nir: Add a dominance validation pass 2020-09-08 19:44:01 +00:00
spirv spirv: Run repair_ssa if there are discard instructions 2020-09-08 19:44:01 +00:00
Android.glsl.gen.mk Android: Fixes for Q and R 2020-07-15 20:49:24 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk
Android.nir.gen.mk nir: Add missing dependency in Android.nir.gen.mk 2019-08-19 09:53:18 +03:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
builtin_type_macros.h nir/vtn: Add support for kernel images to SPIRV-to-NIR. 2020-08-31 21:17:39 +00:00
glsl_types.cpp compiler/types: Fix deserializing structs with >= 15 members 2020-09-04 20:12:12 +00:00
glsl_types.h nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
Makefile.sources nir: Add a lowering pass for backends wanting load_ubo with vec4 offsets. 2020-08-24 09:53:35 -07:00
meson.build spirv: add some tests for volatile/available/visible 2020-09-01 17:15:22 +00:00
nir_types.cpp nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
nir_types.h nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl Move compiler.h and imports.h/c from src/mesa/main into src/util 2020-03-27 21:00:09 +00:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c compiler: add INTERP_MODE_COLOR for radeonsi 2020-09-02 23:03:00 -04:00
shader_enums.h compiler: add INTERP_MODE_COLOR for radeonsi 2020-09-02 23:03:00 -04:00
shader_info.h nir/vtn: Convert constant samplers to variables with data 2020-08-31 21:17:39 +00:00