summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-09-26 19:05:18 +0100
committerDave Airlie <airlied@redhat.com>2011-10-09 10:01:08 +0100
commit4e28e6f6c777841b9ffe7a7ad1e865e2595f70f9 (patch)
treed3ba72674afcbfec4f4c49ba692f695aff050766 /src/gallium/drivers/r300/r300_blit.c
parent06415d3fab443d95c666a7c1be46c27f27000529 (diff)
downloadexternal_mesa3d-4e28e6f6c777841b9ffe7a7ad1e865e2595f70f9.zip
external_mesa3d-4e28e6f6c777841b9ffe7a7ad1e865e2595f70f9.tar.gz
external_mesa3d-4e28e6f6c777841b9ffe7a7ad1e865e2595f70f9.tar.bz2
u_blitter: add integer clear support
We need add a new set of fragment shader variants, along with new vertex elements for signed and unsigned clears. The new fragment shader variants are due to the integers values requiring CONSTANT interpolation. The new vertex element descriptions are for passing the clear color as an unsigned or signed integer value. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r--src/gallium/drivers/r300/r300_blit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index f0743d5..d1ccde1 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -292,13 +292,14 @@ static void r300_clear(struct pipe_context* pipe,
/* Clear. */
if (buffers) {
+ enum pipe_format cformat = fb->nr_cbufs ? fb->cbufs[0]->format : PIPE_FORMAT_NONE;
/* Clear using the blitter. */
r300_blitter_begin(r300, R300_CLEAR);
util_blitter_clear(r300->blitter,
width,
height,
fb->nr_cbufs,
- buffers, color, depth, stencil);
+ buffers, cformat, color, depth, stencil);
r300_blitter_end(r300);
} else if (r300->zmask_clear.dirty || r300->hiz_clear.dirty) {
/* Just clear zmask and hiz now, this does not use the standard draw