mesa/st: handle copy_deref cases for adding pointsize

these may not have been lowered yet

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15821>
This commit is contained in:
Mike Blumenkrantz 2022-04-08 11:36:14 -04:00 committed by Marge Bot
parent a2823747bb
commit cfca760d6e

View file

@ -269,7 +269,8 @@ st_nir_add_point_size(nir_shader *nir)
nir_foreach_instr_safe(instr, block) {
if (instr->type == nir_instr_type_intrinsic) {
nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr);
if (intr->intrinsic == nir_intrinsic_store_deref) {
if (intr->intrinsic == nir_intrinsic_store_deref ||
intr->intrinsic == nir_intrinsic_copy_deref) {
nir_variable *var = nir_intrinsic_get_var(intr, 0);
if (var->data.location == VARYING_SLOT_POS) {
b.cursor = nir_after_instr(instr);