nir/lower_point_size: skip non-var derefs
these can happen depending on pass order, otherwise we crash on the null pointer. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32564>
This commit is contained in:
committed by
Marge Bot
parent
a667a5a5d6
commit
83dd4889a7
@@ -43,6 +43,9 @@ lower_point_size_intrin(nir_builder *b, nir_intrinsic_instr *intr, void *data)
|
||||
if (intr->intrinsic == nir_intrinsic_store_deref) {
|
||||
nir_deref_instr *deref = nir_src_as_deref(intr->src[0]);
|
||||
nir_variable *var = nir_deref_instr_get_variable(deref);
|
||||
if (!var)
|
||||
return false;
|
||||
|
||||
location = var->data.location;
|
||||
psiz_src = &intr->src[1];
|
||||
} else if (intr->intrinsic == nir_intrinsic_store_output ||
|
||||
|
||||
Reference in New Issue
Block a user