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/ilo/ilo_shader.c | |
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/ilo/ilo_shader.c')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_shader.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gallium/drivers/ilo/ilo_shader.c b/src/gallium/drivers/ilo/ilo_shader.c index c61716dc791..4eab174e433 100644 --- a/src/gallium/drivers/ilo/ilo_shader.c +++ b/src/gallium/drivers/ilo/ilo_shader.c @@ -265,16 +265,16 @@ ilo_shader_variant_init(struct ilo_shader_variant *variant, variant->sampler_view_swizzles[i].a = view->swizzle_a; } else if (info->shadow_samplers & (1 << i)) { - variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_ONE; + variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_1; } else { - variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_GREEN; - variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_BLUE; - variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_ALPHA; + variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_Y; + variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_Z; + variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_W; } /* @@ -323,16 +323,16 @@ ilo_shader_variant_guess(struct ilo_shader_variant *variant, variant->num_sampler_views = info->num_samplers; for (i = 0; i < info->num_samplers; i++) { if (info->shadow_samplers & (1 << i)) { - variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_ONE; + variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_1; } else { - variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_RED; - variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_GREEN; - variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_BLUE; - variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_ALPHA; + variant->sampler_view_swizzles[i].r = PIPE_SWIZZLE_X; + variant->sampler_view_swizzles[i].g = PIPE_SWIZZLE_Y; + variant->sampler_view_swizzles[i].b = PIPE_SWIZZLE_Z; + variant->sampler_view_swizzles[i].a = PIPE_SWIZZLE_W; } } } |