summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
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/radeonsi
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/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 3f74176d041..7ae6e8aff08 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -209,17 +209,17 @@ unsigned cik_db_pipe_config(struct si_screen *sscreen, unsigned tile_mode)
static unsigned si_map_swizzle(unsigned swizzle)
{
switch (swizzle) {
- case UTIL_FORMAT_SWIZZLE_Y:
+ case PIPE_SWIZZLE_Y:
return V_008F0C_SQ_SEL_Y;
- case UTIL_FORMAT_SWIZZLE_Z:
+ case PIPE_SWIZZLE_Z:
return V_008F0C_SQ_SEL_Z;
- case UTIL_FORMAT_SWIZZLE_W:
+ case PIPE_SWIZZLE_W:
return V_008F0C_SQ_SEL_W;
- case UTIL_FORMAT_SWIZZLE_0:
+ case PIPE_SWIZZLE_0:
return V_008F0C_SQ_SEL_0;
- case UTIL_FORMAT_SWIZZLE_1:
+ case PIPE_SWIZZLE_1:
return V_008F0C_SQ_SEL_1;
- default: /* UTIL_FORMAT_SWIZZLE_X */
+ default: /* PIPE_SWIZZLE_X */
return V_008F0C_SQ_SEL_X;
}
}
@@ -2205,7 +2205,7 @@ static void si_initialize_color_surface(struct si_context *sctx,
/* Intensity is implemented as Red, so treat it that way. */
color_attrib = S_028C74_TILE_MODE_INDEX(tile_mode_index) |
- S_028C74_FORCE_DST_ALPHA_1(desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_1 ||
+ S_028C74_FORCE_DST_ALPHA_1(desc->swizzle[3] == PIPE_SWIZZLE_1 ||
util_format_is_intensity(surf->base.format));
if (rtex->resource.b.b.nr_samples > 1) {
@@ -3562,10 +3562,10 @@ static void si_query_opaque_metadata(struct r600_common_screen *rscreen,
struct si_screen *sscreen = (struct si_screen*)rscreen;
struct pipe_resource *res = &rtex->resource.b.b;
static const unsigned char swizzle[] = {
- PIPE_SWIZZLE_RED,
- PIPE_SWIZZLE_GREEN,
- PIPE_SWIZZLE_BLUE,
- PIPE_SWIZZLE_ALPHA
+ PIPE_SWIZZLE_X,
+ PIPE_SWIZZLE_Y,
+ PIPE_SWIZZLE_Z,
+ PIPE_SWIZZLE_W
};
uint32_t desc[8], i;
bool is_array = util_resource_is_array_texture(res);