summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-04-16 14:05:47 +0200
committerMarek Olšák <[email protected]>2016-04-22 01:30:39 +0200
commitfb523cb6ad3ffef22ab4b9cce9e53859c17c5739 (patch)
tree45b67da368c4c387329e5887ab6d49d61f0b85a9 /src/gallium/drivers/nouveau/nvc0
parented23335a313dfc9cec26999c0adffe3ab3a73a58 (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/nouveau/nvc0')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_surface.c8
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_tex.c12
2 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index e108590e215..a1775698a3d 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -959,10 +959,10 @@ nvc0_blit_set_src(struct nvc0_blitctx *ctx,
templ.format = format;
templ.u.tex.first_layer = templ.u.tex.last_layer = layer;
templ.u.tex.first_level = templ.u.tex.last_level = level;
- templ.swizzle_r = PIPE_SWIZZLE_RED;
- templ.swizzle_g = PIPE_SWIZZLE_GREEN;
- templ.swizzle_b = PIPE_SWIZZLE_BLUE;
- templ.swizzle_a = PIPE_SWIZZLE_ALPHA;
+ templ.swizzle_r = PIPE_SWIZZLE_X;
+ templ.swizzle_g = PIPE_SWIZZLE_Y;
+ templ.swizzle_b = PIPE_SWIZZLE_Z;
+ templ.swizzle_a = PIPE_SWIZZLE_W;
if (layer == -1) {
templ.u.tex.first_layer = 0;
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
index e04573f8249..21618468bef 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
@@ -36,13 +36,13 @@ static inline uint32_t
nv50_tic_swizzle(const struct nvc0_format *fmt, unsigned swz, bool tex_int)
{
switch (swz) {
- case PIPE_SWIZZLE_RED : return fmt->tic.src_x;
- case PIPE_SWIZZLE_GREEN: return fmt->tic.src_y;
- case PIPE_SWIZZLE_BLUE : return fmt->tic.src_z;
- case PIPE_SWIZZLE_ALPHA: return fmt->tic.src_w;
- case PIPE_SWIZZLE_ONE:
+ case PIPE_SWIZZLE_X : return fmt->tic.src_x;
+ case PIPE_SWIZZLE_Y: return fmt->tic.src_y;
+ case PIPE_SWIZZLE_Z : return fmt->tic.src_z;
+ case PIPE_SWIZZLE_W: return fmt->tic.src_w;
+ case PIPE_SWIZZLE_1:
return tex_int ? G80_TIC_SOURCE_ONE_INT : G80_TIC_SOURCE_ONE_FLOAT;
- case PIPE_SWIZZLE_ZERO:
+ case PIPE_SWIZZLE_0:
default:
return G80_TIC_SOURCE_ZERO;
}