summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_blit.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-09-16 09:39:34 +0100
committerDave Airlie <airlied@redhat.com>2011-09-18 15:12:47 +0100
commit6dd284f7c8fac22f64c13fdf9909094f5ec59086 (patch)
tree8fe6c89638f05d1638b3a5d0395e011d68eda336 /src/gallium/drivers/r300/r300_blit.c
parent78026b8acef9d6eea4f37d9c5435447944d1befd (diff)
downloadexternal_mesa3d-6dd284f7c8fac22f64c13fdf9909094f5ec59086.zip
external_mesa3d-6dd284f7c8fac22f64c13fdf9909094f5ec59086.tar.gz
external_mesa3d-6dd284f7c8fac22f64c13fdf9909094f5ec59086.tar.bz2
gallium: move clear paths from rgba to a pointer to a color union (v2)
This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values. Notes: 1. the value is opaque. 2. only when the value is used should it be interpretered according to the surface format it is going to be used with. 3. float clears on integer buffers and vice-versa are undefined. v2: fixed up vega and graw, dropped hunks that shouldn't have been in patch. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c
index ddf5448..3c1b364 100644
--- a/src/gallium/drivers/r300/r300_blit.c
+++ b/src/gallium/drivers/r300/r300_blit.c
@@ -174,7 +174,7 @@ static uint32_t r300_hiz_clear_value(double depth)
/* Clear currently bound buffers. */
static void r300_clear(struct pipe_context* pipe,
unsigned buffers,
- const float* rgba,
+ const union pipe_color_union *color,
double depth,
unsigned stencil)
{
@@ -281,7 +281,7 @@ static void r300_clear(struct pipe_context* pipe,
struct r300_surface *surf = r300_surface(fb->cbufs[0]);
hyperz->zb_depthclearvalue =
- r300_depth_clear_cb_value(surf->base.format, rgba);
+ r300_depth_clear_cb_value(surf->base.format, color->f);
width = surf->cbzb_width;
height = surf->cbzb_height;
@@ -298,7 +298,7 @@ static void r300_clear(struct pipe_context* pipe,
width,
height,
fb->nr_cbufs,
- buffers, rgba, depth, stencil);
+ buffers, 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
@@ -348,14 +348,14 @@ static void r300_clear(struct pipe_context* pipe,
/* Clear a region of a color surface to a constant value. */
static void r300_clear_render_target(struct pipe_context *pipe,
struct pipe_surface *dst,
- const float *rgba,
+ const union pipe_color_union *color,
unsigned dstx, unsigned dsty,
unsigned width, unsigned height)
{
struct r300_context *r300 = r300_context(pipe);
r300_blitter_begin(r300, R300_CLEAR_SURFACE);
- util_blitter_clear_render_target(r300->blitter, dst, rgba,
+ util_blitter_clear_render_target(r300->blitter, dst, color,
dstx, dsty, width, height);
r300_blitter_end(r300);
}