summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/postprocess
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-09-16 09:39:34 +0100
committerDave Airlie <[email protected]>2011-09-18 15:12:47 +0100
commit6dd284f7c8fac22f64c13fdf9909094f5ec59086 (patch)
tree8fe6c89638f05d1638b3a5d0395e011d68eda336 /src/gallium/auxiliary/postprocess
parent78026b8acef9d6eea4f37d9c5435447944d1befd (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
-rw-r--r--src/gallium/auxiliary/postprocess/pp_mlaa.c2
-rw-r--r--src/gallium/auxiliary/postprocess/pp_program.h2
-rw-r--r--src/gallium/auxiliary/postprocess/pp_run.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_mlaa.c b/src/gallium/auxiliary/postprocess/pp_mlaa.c
index 476502fca93..5708687a1c2 100644
--- a/src/gallium/auxiliary/postprocess/pp_mlaa.c
+++ b/src/gallium/auxiliary/postprocess/pp_mlaa.c
@@ -121,7 +121,7 @@ pp_jimenezmlaa_run(struct pp_queue_t *ppq, struct pipe_resource *in,
pp_filter_misc_state(p);
cso_set_depth_stencil_alpha(p->cso, &mstencil);
p->pipe->clear(p->pipe, PIPE_CLEAR_STENCIL | PIPE_CLEAR_COLOR,
- p->clear_color, 0, 0);
+ &p->clear_color, 0, 0);
cso_single_sampler(p->cso, 0, &p->sampler_point);
cso_single_sampler_done(p->cso);
diff --git a/src/gallium/auxiliary/postprocess/pp_program.h b/src/gallium/auxiliary/postprocess/pp_program.h
index 2749b35b372..a85ba6ea797 100644
--- a/src/gallium/auxiliary/postprocess/pp_program.h
+++ b/src/gallium/auxiliary/postprocess/pp_program.h
@@ -49,7 +49,7 @@ struct program
struct pipe_framebuffer_state framebuffer;
struct pipe_vertex_element velem[2];
- float clear_color[4];
+ union pipe_color_union clear_color;
void *passvs;
diff --git a/src/gallium/auxiliary/postprocess/pp_run.c b/src/gallium/auxiliary/postprocess/pp_run.c
index ce671aea360..de1fe559e49 100644
--- a/src/gallium/auxiliary/postprocess/pp_run.c
+++ b/src/gallium/auxiliary/postprocess/pp_run.c
@@ -184,5 +184,5 @@ void
pp_filter_set_clear_fb(struct program *p)
{
cso_set_framebuffer(p->cso, &p->framebuffer);
- p->pipe->clear(p->pipe, PIPE_CLEAR_COLOR, p->clear_color, 0, 0);
+ p->pipe->clear(p->pipe, PIPE_CLEAR_COLOR, &p->clear_color, 0, 0);
}