Skip to content

Commit

Permalink
nir/lower_is_helper_invocation: create load_helper_invocation instr w…
Browse files Browse the repository at this point in the history
…ith 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: f17b41a ("nir: add lowering pass for helperInvocationEXT()")

Reviewed-by: Danylo Piliaiev <[email protected]>

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15402>
  • Loading branch information
zmike authored and Marge Bot committed Mar 21, 2022
1 parent fe33835 commit cdcfcb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/nir/nir_lower_is_helper_invocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cdcfcb7

Please sign in to comment.