nir: Let nir_lower_texcoord_replace_late() report progress

Useful if we want to wrap this pass with a NIR_PASS() to enforce
validation.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32480>
This commit is contained in:
Boris Brezillon
2024-12-04 11:14:06 +01:00
committed by Marge Bot
parent ea112cf84d
commit 98e3c1e6fb
2 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -6706,7 +6706,7 @@ bool nir_lower_point_size(nir_shader *shader, float min, float max);
void nir_lower_texcoord_replace(nir_shader *s, unsigned coord_replace,
bool point_coord_is_sysval, bool yinvert);
void nir_lower_texcoord_replace_late(nir_shader *s, unsigned coord_replace,
bool nir_lower_texcoord_replace_late(nir_shader *s, unsigned coord_replace,
bool point_coord_is_sysval);
typedef enum {
@@ -69,7 +69,7 @@ pass(nir_builder *b, nir_instr *instr, void *data)
return true;
}
void
bool
nir_lower_texcoord_replace_late(nir_shader *s, unsigned coord_replace,
bool point_coord_is_sysval)
{
@@ -80,7 +80,7 @@ nir_lower_texcoord_replace_late(nir_shader *s, unsigned coord_replace,
/* If no relevant texcoords are read, there's nothing to do */
if (!(s->info.inputs_read & replace_mask))
return;
return false;
/* Otherwise, we're going to replace these texcoord reads with a PNTC read */
s->info.inputs_read &= ~(((uint64_t)coord_replace) << VARYING_SLOT_TEX0);
@@ -88,10 +88,10 @@ nir_lower_texcoord_replace_late(nir_shader *s, unsigned coord_replace,
if (!point_coord_is_sysval)
s->info.inputs_read |= BITFIELD64_BIT(VARYING_SLOT_PNTC);
nir_shader_instructions_pass(s, pass,
nir_metadata_control_flow,
&(struct opts){
.coord_replace = coord_replace,
.point_coord_is_sysval = point_coord_is_sysval,
});
return nir_shader_instructions_pass(s, pass,
nir_metadata_control_flow,
&(struct opts){
.coord_replace = coord_replace,
.point_coord_is_sysval = point_coord_is_sysval,
});
}