summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_gmem.c4
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_util.c16
2 files changed, 10 insertions, 10 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]])) |