summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_shader.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-08-04 01:50:10 +0200
committerMarek Olšák <[email protected]>2012-08-15 19:20:57 +0200
commit26cb887ea213be2445e0fd64364d9264ed4fbfd2 (patch)
tree1cbf952604bbb3157a03fb05bcf364d8f15696f2 /src/gallium/drivers/r600/r600_shader.c
parent4f215952760b2e5a92b25ddfa89469c1ec110160 (diff)
r600g: implement alpha-to-one
Diffstat (limited to 'src/gallium/drivers/r600/r600_shader.c')
-rw-r--r--src/gallium/drivers/r600/r600_shader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 3c0fbc8bdcc..e4818a08212 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -1572,6 +1572,7 @@ static int r600_shader_from_tgsi(struct r600_context * rctx, struct r600_pipe_sh
j--;
continue;
}
+ output[j].swizzle_w = rctx->alpha_to_one && rctx->multisample_enable && !rctx->cb0_is_integer ? 5 : 3;
output[j].array_base = next_pixel_base++;
output[j].type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_PIXEL;
shader->nr_ps_color_exports++;
@@ -1584,7 +1585,7 @@ static int r600_shader_from_tgsi(struct r600_context * rctx, struct r600_pipe_sh
output[j].swizzle_x = 0;
output[j].swizzle_y = 1;
output[j].swizzle_z = 2;
- output[j].swizzle_w = 3;
+ output[j].swizzle_w = rctx->alpha_to_one && rctx->multisample_enable && !rctx->cb0_is_integer ? 5 : 3;
output[j].burst_count = 1;
output[j].barrier = 1;
output[j].array_base = next_pixel_base++;