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/shader | |
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/shader')
-rw-r--r-- | src/gallium/drivers/ilo/shader/ilo_shader_fs.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/ilo_shader_vs.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c index 6c8f1b5222e..d2b205a370d 100644 --- a/src/gallium/drivers/ilo/shader/ilo_shader_fs.c +++ b/src/gallium/drivers/ilo/shader/ilo_shader_fs.c @@ -1143,19 +1143,19 @@ fs_lower_opcode_tgsi_sampling(struct fs_compile_context *fcc, swizzles[3] = fcc->variant->sampler_view_swizzles[sampler_index].a; } else { - swizzles[0] = PIPE_SWIZZLE_RED; - swizzles[1] = PIPE_SWIZZLE_GREEN; - swizzles[2] = PIPE_SWIZZLE_BLUE; - swizzles[3] = PIPE_SWIZZLE_ALPHA; + swizzles[0] = PIPE_SWIZZLE_X; + swizzles[1] = PIPE_SWIZZLE_Y; + swizzles[2] = PIPE_SWIZZLE_Z; + swizzles[3] = PIPE_SWIZZLE_W; } /* swizzle the results */ for (i = 0; i < 4; i++) { switch (swizzles[i]) { - case PIPE_SWIZZLE_ZERO: + case PIPE_SWIZZLE_0: tc_MOV(tc, dst[i], tsrc_imm_f(0.0f)); break; - case PIPE_SWIZZLE_ONE: + case PIPE_SWIZZLE_1: tc_MOV(tc, dst[i], tsrc_imm_f(1.0f)); break; default: diff --git a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c index 2b46d44f5be..514e636f327 100644 --- a/src/gallium/drivers/ilo/shader/ilo_shader_vs.c +++ b/src/gallium/drivers/ilo/shader/ilo_shader_vs.c @@ -610,10 +610,10 @@ vs_lower_opcode_tgsi_sampling(struct vs_compile_context *vcc, swizzles[3] = vcc->variant->sampler_view_swizzles[sampler_index].a; } else { - swizzles[0] = PIPE_SWIZZLE_RED; - swizzles[1] = PIPE_SWIZZLE_GREEN; - swizzles[2] = PIPE_SWIZZLE_BLUE; - swizzles[3] = PIPE_SWIZZLE_ALPHA; + swizzles[0] = PIPE_SWIZZLE_X; + swizzles[1] = PIPE_SWIZZLE_Y; + swizzles[2] = PIPE_SWIZZLE_Z; + swizzles[3] = PIPE_SWIZZLE_W; } swizzle_zero_mask = 0; @@ -621,11 +621,11 @@ vs_lower_opcode_tgsi_sampling(struct vs_compile_context *vcc, swizzle_normal_mask = 0; for (i = 0; i < 4; i++) { switch (swizzles[i]) { - case PIPE_SWIZZLE_ZERO: + case PIPE_SWIZZLE_0: swizzle_zero_mask |= 1 << i; swizzles[i] = i; break; - case PIPE_SWIZZLE_ONE: + case PIPE_SWIZZLE_1: swizzle_one_mask |= 1 << i; swizzles[i] = i; break; |