From e1b042d2d7a52f2666b1b685bb30fb5d8edecc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Ondra=C4=8Dka?= Date: Thu, 7 May 2026 11:28:19 +0200 Subject: [PATCH] r300: drop GLSL 4.x interpolation intrinsics from ntr Part-of: --- src/gallium/drivers/r300/compiler/nir_to_rc.c | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/src/gallium/drivers/r300/compiler/nir_to_rc.c b/src/gallium/drivers/r300/compiler/nir_to_rc.c index cff2849eca5..02aadfd03ae 100644 --- a/src/gallium/drivers/r300/compiler/nir_to_rc.c +++ b/src/gallium/drivers/r300/compiler/nir_to_rc.c @@ -1046,9 +1046,8 @@ ntr_emit_load_input(struct ntr_compile *c, nir_intrinsic_instr *instr) switch (bary_instr->intrinsic) { case nir_intrinsic_load_barycentric_pixel: - case nir_intrinsic_load_barycentric_sample: - /* For these, we know that the barycentric load matches the - * interpolation on the input declaration, so we can use it directly. + /* The barycentric load matches the interpolation on the input + * declaration, so we can use it directly. */ ntr_store(c, &instr->def, input); break; @@ -1065,16 +1064,6 @@ ntr_emit_load_input(struct ntr_compile *c, nir_intrinsic_instr *instr) } break; - case nir_intrinsic_load_barycentric_at_sample: - /* We stored the sample in the fake "bary" dest. */ - ntr_INTERP_SAMPLE(c, ntr_get_dest(c, &instr->def), input, ntr_get_src(c, instr->src[0])); - break; - - case nir_intrinsic_load_barycentric_at_offset: - /* We stored the offset in the fake "bary" dest. */ - ntr_INTERP_OFFSET(c, ntr_get_dest(c, &instr->def), input, ntr_get_src(c, instr->src[0])); - break; - default: UNREACHABLE("bad barycentric interp intrinsic\n"); } @@ -1179,17 +1168,13 @@ ntr_emit_intrinsic(struct ntr_compile *c, nir_intrinsic_instr *instr) ntr_KILL_IF(c, ureg_negate(cond)); break; } - /* In TGSI we don't actually generate the barycentric coords, and emit - * interp intrinsics later. However, we do need to store the - * load_barycentric_at_* argument so that we can use it at that point. + /* In TGSI we don't actually generate the barycentric coords, and + * emit the corresponding INTERP_CENTROID instruction in + * ntr_emit_load_input. The barycentric loads themselves are + * therefore consumed there. */ case nir_intrinsic_load_barycentric_pixel: case nir_intrinsic_load_barycentric_centroid: - case nir_intrinsic_load_barycentric_sample: - break; - case nir_intrinsic_load_barycentric_at_sample: - case nir_intrinsic_load_barycentric_at_offset: - ntr_store(c, &instr->def, ntr_get_src(c, instr->src[0])); break; case nir_intrinsic_ddx: