Mesa (master): freedreno/ir3: remove input ncomp field

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 14 22:07:06 UTC 2019


Module: Mesa
Branch: master
Commit: 08003c37b987abd7fc9ef57fdfa326c9210cb1ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=08003c37b987abd7fc9ef57fdfa326c9210cb1ff

Author: Jonathan Marek <jonathan at marek.ca>
Date:   Sun Oct  6 20:53:41 2019 -0400

freedreno/ir3: remove input ncomp field

Signed-off-by: Jonathan Marek <jonathan at marek.ca>
Reviewed-by: Rob Clark <robclark at gmail.com>

---

 src/freedreno/ir3/ir3_compiler_nir.c          | 3 ---
 src/freedreno/ir3/ir3_shader.h                | 1 -
 src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 2 +-
 src/gallium/drivers/freedreno/a4xx/fd4_emit.c | 2 +-
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 0e5491151d3..7f000cdc385 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -2396,7 +2396,6 @@ setup_input(struct ir3_context *ctx, nir_variable *in)
 	so->inputs[n].compmask = (1 << (ncomp + frac)) - 1;
 	so->inputs_count = MAX2(so->inputs_count, n + 1);
 	so->inputs[n].interpolate = in->data.interpolation;
-	so->inputs[n].ncomp = ncomp;
 
 	if (ctx->so->type == MESA_SHADER_FRAGMENT) {
 
@@ -2513,7 +2512,6 @@ pack_inlocs(struct ir3_context *ctx)
 	for (unsigned i = 0; i < so->inputs_count; i++) {
 		unsigned compmask = 0, maxcomp = 0;
 
-		so->inputs[i].ncomp = 0;
 		so->inputs[i].inloc = inloc;
 		so->inputs[i].bary = false;
 
@@ -2523,7 +2521,6 @@ pack_inlocs(struct ir3_context *ctx)
 
 			compmask |= (1 << j);
 			actual_in++;
-			so->inputs[i].ncomp++;
 			maxcomp = j + 1;
 
 			/* at this point, since used_components[i] mask is only
diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h
index b2d08fe95f3..bc7b6b43c88 100644
--- a/src/freedreno/ir3/ir3_shader.h
+++ b/src/freedreno/ir3/ir3_shader.h
@@ -451,7 +451,6 @@ struct ir3_shader_variant {
 		uint8_t slot;
 		uint8_t regid;
 		uint8_t compmask;
-		uint8_t ncomp;
 		/* location of input (ie. offset passed to bary.f, etc).  This
 		 * matches the SP_VS_VPC_DST_REG.OUTLOCn value (a3xx and a4xx
 		 * have the OUTLOCn value offset by 8, presumably to account
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
index 43de2273144..d55628adc47 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
@@ -441,7 +441,7 @@ fd3_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd3_emit *emit)
 					COND(isint, A3XX_VFD_DECODE_INSTR_INT) |
 					COND(switchnext, A3XX_VFD_DECODE_INSTR_SWITCHNEXT));
 
-			total_in += vp->inputs[i].ncomp;
+			total_in += util_bitcount(vp->inputs[i].compmask);
 			j++;
 		}
 	}
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 76f15771abb..73938aa3028 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -443,7 +443,7 @@ fd4_emit_vertex_bufs(struct fd_ringbuffer *ring, struct fd4_emit *emit)
 					COND(isint, A4XX_VFD_DECODE_INSTR_INT) |
 					COND(switchnext, A4XX_VFD_DECODE_INSTR_SWITCHNEXT));
 
-			total_in += vp->inputs[i].ncomp;
+			total_in += util_bitcount(vp->inputs[i].compmask);
 			j++;
 		}
 	}




More information about the mesa-commit mailing list