diff options
author | Marek Olšák <[email protected]> | 2016-04-16 14:05:47 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-04-22 01:30:39 +0200 |
commit | fb523cb6ad3ffef22ab4b9cce9e53859c17c5739 (patch) | |
tree | 45b67da368c4c387329e5887ab6d49d61f0b85a9 /src/gallium/drivers/freedreno/a3xx | |
parent | ed23335a313dfc9cec26999c0adffe3ab3a73a58 (diff) |
gallium: merge PIPE_SWIZZLE_* and UTIL_FORMAT_SWIZZLE_*
Use PIPE_SWIZZLE_* everywhere.
Use X/Y/Z/W/0/1 instead of RED, GREEN, BLUE, ALPHA, ZERO, ONE.
The new enum is called pipe_swizzle.
Acked-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_format.c | 12 |
2 files changed, 8 insertions, 8 deletions
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; } } |