summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_gmem.c4
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_util.c16
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_emit.c4
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_format.c12
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c4
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_format.c12
6 files changed, 26 insertions, 26 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
index 982c9c2b097..aa47267444f 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_gmem.c
@@ -186,8 +186,8 @@ emit_mem2gmem_surf(struct fd_context *ctx, uint32_t base,
A2XX_RB_COLOR_INFO_BASE(base) |
A2XX_RB_COLOR_INFO_FORMAT(fd2_pipe2color(psurf->format)));
- swiz = fd2_tex_swiz(psurf->format, PIPE_SWIZZLE_RED, PIPE_SWIZZLE_GREEN,
- PIPE_SWIZZLE_BLUE, PIPE_SWIZZLE_ALPHA);
+ swiz = fd2_tex_swiz(psurf->format, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
+ PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W);
/* emit fb as a texture: */
OUT_PKT3(ring, CP_SET_CONSTANT, 7);
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_util.c b/src/gallium/drivers/freedreno/a2xx/fd2_util.c
index 9781326a5af..6cece91a277 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_util.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_util.c
@@ -294,12 +294,12 @@ tex_swiz(unsigned swiz)
{
switch (swiz) {
default:
- case PIPE_SWIZZLE_RED: return SQ_TEX_X;
- case PIPE_SWIZZLE_GREEN: return SQ_TEX_Y;
- case PIPE_SWIZZLE_BLUE: return SQ_TEX_Z;
- case PIPE_SWIZZLE_ALPHA: return SQ_TEX_W;
- case PIPE_SWIZZLE_ZERO: return SQ_TEX_ZERO;
- case PIPE_SWIZZLE_ONE: return SQ_TEX_ONE;
+ case PIPE_SWIZZLE_X: return SQ_TEX_X;
+ case PIPE_SWIZZLE_Y: return SQ_TEX_Y;
+ case PIPE_SWIZZLE_Z: return SQ_TEX_Z;
+ case PIPE_SWIZZLE_W: return SQ_TEX_W;
+ case PIPE_SWIZZLE_0: return SQ_TEX_ZERO;
+ case PIPE_SWIZZLE_1: return SQ_TEX_ONE;
}
}
@@ -311,8 +311,8 @@ fd2_tex_swiz(enum pipe_format format, unsigned swizzle_r, unsigned swizzle_g,
util_format_description(format);
uint8_t swiz[] = {
swizzle_r, swizzle_g, swizzle_b, swizzle_a,
- PIPE_SWIZZLE_ZERO, PIPE_SWIZZLE_ONE,
- PIPE_SWIZZLE_ONE, PIPE_SWIZZLE_ONE,
+ PIPE_SWIZZLE_0, PIPE_SWIZZLE_1,
+ PIPE_SWIZZLE_1, PIPE_SWIZZLE_1,
};
return A2XX_SQ_TEX_3_SWIZ_X(tex_swiz(swiz[desc->swizzle[0]])) |
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
index adfa9a96a46..7d508e7397c 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
@@ -309,8 +309,8 @@ fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring,
OUT_RING(ring, A3XX_TEX_CONST_0_FMT(fd3_pipe2tex(format)) |
A3XX_TEX_CONST_0_TYPE(A3XX_TEX_2D) |
- fd3_tex_swiz(format, PIPE_SWIZZLE_RED, PIPE_SWIZZLE_GREEN,
- PIPE_SWIZZLE_BLUE, PIPE_SWIZZLE_ALPHA));
+ fd3_tex_swiz(format, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
+ PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W));
OUT_RING(ring, A3XX_TEX_CONST_1_FETCHSIZE(TFETCH_DISABLE) |
A3XX_TEX_CONST_1_WIDTH(psurf[i]->width) |
A3XX_TEX_CONST_1_HEIGHT(psurf[i]->height));
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_format.c b/src/gallium/drivers/freedreno/a3xx/fd3_format.c
index 52ea9444517..7050ded133d 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_format.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_format.c
@@ -391,12 +391,12 @@ tex_swiz(unsigned swiz)
{
switch (swiz) {
default:
- case PIPE_SWIZZLE_RED: return A3XX_TEX_X;
- case PIPE_SWIZZLE_GREEN: return A3XX_TEX_Y;
- case PIPE_SWIZZLE_BLUE: return A3XX_TEX_Z;
- case PIPE_SWIZZLE_ALPHA: return A3XX_TEX_W;
- case PIPE_SWIZZLE_ZERO: return A3XX_TEX_ZERO;
- case PIPE_SWIZZLE_ONE: return A3XX_TEX_ONE;
+ case PIPE_SWIZZLE_X: return A3XX_TEX_X;
+ case PIPE_SWIZZLE_Y: return A3XX_TEX_Y;
+ case PIPE_SWIZZLE_Z: return A3XX_TEX_Z;
+ case PIPE_SWIZZLE_W: return A3XX_TEX_W;
+ case PIPE_SWIZZLE_0: return A3XX_TEX_ZERO;
+ case PIPE_SWIZZLE_1: return A3XX_TEX_ONE;
}
}
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 81ed16ce8ac..e984d9bb64c 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -282,8 +282,8 @@ fd4_emit_gmem_restore_tex(struct fd_ringbuffer *ring, unsigned nr_bufs,
OUT_RING(ring, A4XX_TEX_CONST_0_FMT(fd4_pipe2tex(format)) |
A4XX_TEX_CONST_0_TYPE(A4XX_TEX_2D) |
- fd4_tex_swiz(format, PIPE_SWIZZLE_RED, PIPE_SWIZZLE_GREEN,
- PIPE_SWIZZLE_BLUE, PIPE_SWIZZLE_ALPHA));
+ fd4_tex_swiz(format, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
+ PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W));
OUT_RING(ring, A4XX_TEX_CONST_1_WIDTH(bufs[i]->width) |
A4XX_TEX_CONST_1_HEIGHT(bufs[i]->height));
OUT_RING(ring, A4XX_TEX_CONST_2_PITCH(slice->pitch * rsc->cpp) |
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_format.c b/src/gallium/drivers/freedreno/a4xx/fd4_format.c
index c240745cec1..bd7e285f39d 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_format.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_format.c
@@ -441,12 +441,12 @@ tex_swiz(unsigned swiz)
{
switch (swiz) {
default:
- case PIPE_SWIZZLE_RED: return A4XX_TEX_X;
- case PIPE_SWIZZLE_GREEN: return A4XX_TEX_Y;
- case PIPE_SWIZZLE_BLUE: return A4XX_TEX_Z;
- case PIPE_SWIZZLE_ALPHA: return A4XX_TEX_W;
- case PIPE_SWIZZLE_ZERO: return A4XX_TEX_ZERO;
- case PIPE_SWIZZLE_ONE: return A4XX_TEX_ONE;
+ case PIPE_SWIZZLE_X: return A4XX_TEX_X;
+ case PIPE_SWIZZLE_Y: return A4XX_TEX_Y;
+ case PIPE_SWIZZLE_Z: return A4XX_TEX_Z;
+ case PIPE_SWIZZLE_W: return A4XX_TEX_W;
+ case PIPE_SWIZZLE_0: return A4XX_TEX_ZERO;
+ case PIPE_SWIZZLE_1: return A4XX_TEX_ONE;
}
}