From f5707aae3cf33e8e64ebf52d149c2ac22860c3ed Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 14 Apr 2022 13:30:39 +1200 Subject: [PATCH] nir/lower_tex: Copy more fields in lower_tex_to_txd and friends Fixes NIR validation errors for OpenMW on Panfrost. Fixes: 1f97819fbe5 ("panfrost: Emulate GL_CLAMP on Bifrost") Reviewed-by: Mike Blumenkrantz Reviewed-by: Alyssa Rosenzweig Part-of: (cherry picked from commit ad864a7c150a15221fb9c85d3214d4bcb6db7518) --- .pick_status.json | 2 +- src/compiler/nir/nir_lower_tex.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 7326d0ea1a3..d2a24758bc5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2245,7 +2245,7 @@ "description": "nir/lower_tex: Copy more fields in lower_tex_to_txd and friends", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1f97819fbe56a388878a23f49c0cf47016e4dde0" }, diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index d011ee63759..0fe60b683b5 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -767,6 +767,9 @@ lower_tex_to_txd(nir_builder *b, nir_tex_instr *tex) txd->coord_components = tex->coord_components; txd->texture_index = tex->texture_index; txd->sampler_index = tex->sampler_index; + txd->is_array = tex->is_array; + txd->is_shadow = tex->is_shadow; + txd->is_new_style_shadow = tex->is_new_style_shadow; /* reuse existing srcs */ for (unsigned i = 0; i < tex->num_srcs; i++) { @@ -803,6 +806,9 @@ lower_txb_to_txl(nir_builder *b, nir_tex_instr *tex) txl->coord_components = tex->coord_components; txl->texture_index = tex->texture_index; txl->sampler_index = tex->sampler_index; + txl->is_array = tex->is_array; + txl->is_shadow = tex->is_shadow; + txl->is_new_style_shadow = tex->is_new_style_shadow; /* reuse all but bias src */ for (int i = 0; i < 2; i++) {