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/r300 | |
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/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_texture.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 5c443d144ba..a4783f396e1 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -199,7 +199,7 @@ struct r300_sampler_view { unsigned width0_override; unsigned height0_override; - /* Swizzles in the UTIL_FORMAT_SWIZZLE_* representation, + /* Swizzles in the PIPE_SWIZZLE_* representation, * derived from base. */ unsigned char swizzle[4]; diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 741e263e7ed..bae669e78cb 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -865,10 +865,10 @@ static void r300_merge_textures_and_samplers(struct r300_context* r300) /* X24x8 is sampled as Y16X16 on r3xx-r4xx. * The depth here is at the Y component. */ for (j = 0; j < 4; j++) - depth_swizzle[j] = UTIL_FORMAT_SWIZZLE_Y; + depth_swizzle[j] = PIPE_SWIZZLE_Y; } else { for (j = 0; j < 4; j++) - depth_swizzle[j] = UTIL_FORMAT_SWIZZLE_X; + depth_swizzle[j] = PIPE_SWIZZLE_X; } /* If compare mode is disabled, sampler view swizzles diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 709345a492e..da51661d5cd 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -68,22 +68,22 @@ unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format, /* Get swizzle. */ for (i = 0; i < 4; i++) { switch (swizzle[i]) { - case UTIL_FORMAT_SWIZZLE_Y: + case PIPE_SWIZZLE_Y: result |= swizzle_bit[1] << swizzle_shift[i]; break; - case UTIL_FORMAT_SWIZZLE_Z: + case PIPE_SWIZZLE_Z: result |= swizzle_bit[2] << swizzle_shift[i]; break; - case UTIL_FORMAT_SWIZZLE_W: + case PIPE_SWIZZLE_W: result |= swizzle_bit[3] << swizzle_shift[i]; break; - case UTIL_FORMAT_SWIZZLE_0: + case PIPE_SWIZZLE_0: result |= R300_TX_FORMAT_ZERO << swizzle_shift[i]; break; - case UTIL_FORMAT_SWIZZLE_1: + case PIPE_SWIZZLE_1: result |= R300_TX_FORMAT_ONE << swizzle_shift[i]; break; - default: /* UTIL_FORMAT_SWIZZLE_X */ + default: /* PIPE_SWIZZLE_X */ result |= swizzle_bit[0] << swizzle_shift[i]; } } |