aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/tests/trivial/tri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/tests/trivial/tri.c')
-rw-r--r--src/gallium/tests/trivial/tri.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c
index 656e92ee886..d036db80039 100644
--- a/src/gallium/tests/trivial/tri.c
+++ b/src/gallium/tests/trivial/tri.c
@@ -79,7 +79,7 @@ struct program
void *vs;
void *fs;
- float clear_color[4];
+ union pipe_color_union clear_color;
struct pipe_resource *vbuf;
struct pipe_resource *target;
@@ -98,10 +98,10 @@ static void init_prog(struct program *p)
p->cso = cso_create_context(p->pipe);
/* set clear color */
- p->clear_color[0] = 0.3;
- p->clear_color[1] = 0.1;
- p->clear_color[2] = 0.3;
- p->clear_color[3] = 1.0;
+ p->clear_color.f[0] = 0.3;
+ p->clear_color.f[1] = 0.1;
+ p->clear_color.f[2] = 0.3;
+ p->clear_color.f[3] = 1.0;
/* vertex buffer */
{
@@ -243,7 +243,7 @@ static void draw(struct program *p)
cso_set_framebuffer(p->cso, &p->framebuffer);
/* clear the render target */
- 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);
/* set misc state we care about */
cso_set_blend(p->cso, &p->blend);