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: f17b41ab4f ("nir: add lowering pass for helperInvocationEXT()")

Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
This commit is contained in:
Mike Blumenkrantz 2022-03-14 15:45:17 -04:00 committed by Marge Bot
parent fe33835091
commit cdcfcb7916
1 changed files with 1 additions and 1 deletions

View File

@ -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);