From cdcfcb791611b290cdbaa67641dcaf122dbaa614 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 14 Mar 2022 15:45:17 -0400 Subject: [PATCH] nir/lower_is_helper_invocation: create load_helper_invocation instr with bitsize=1 the specification stipulates that this is a bool value, so don't load it as an int or else nir_validate explodes Fixes: f17b41ab4f0 ("nir: add lowering pass for helperInvocationEXT()") Reviewed-by: Danylo Piliaiev Reviewed-by: Dave Airlie Part-of: --- src/compiler/nir/nir_lower_is_helper_invocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_is_helper_invocation.c b/src/compiler/nir/nir_lower_is_helper_invocation.c index 38263d5c2ec..b2dfb84f65a 100644 --- a/src/compiler/nir/nir_lower_is_helper_invocation.c +++ b/src/compiler/nir/nir_lower_is_helper_invocation.c @@ -114,7 +114,7 @@ nir_lower_is_helper_invocation(nir_shader *shader) glsl_bool_type(), "gl_IsHelperInvocationEXT"); - nir_ssa_def *started_as_helper = nir_load_helper_invocation(&b, 32); + nir_ssa_def *started_as_helper = nir_load_helper_invocation(&b, 1); nir_deref_instr *is_helper_deref = nir_build_deref_var(&b, is_helper); nir_store_deref(&b, is_helper_deref, started_as_helper, 1);