From 3e37848f508ff2270ca78859560144fb92b1563f 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: (cherry picked from commit cdcfcb791611b290cdbaa67641dcaf122dbaa614) --- .pick_status.json | 2 +- src/compiler/nir/nir_lower_is_helper_invocation.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1ba0ba4b88b..555b43741e5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -748,7 +748,7 @@ "description": "nir/lower_is_helper_invocation: create load_helper_invocation instr with bitsize=1", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "because_sha": "f17b41ab4f017b562fdf7c388200e68c22105331" }, { 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);