diff options
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index d69b4cf4275..fc3ba335886 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -1186,7 +1186,7 @@ static void r300_blitter_draw_rectangle(struct blitter_context *blitter, unsigned x2, unsigned y2, float depth, enum blitter_attrib_type type, - const float attrib[4]) + const union pipe_color_union *attrib) { struct r300_context *r300 = r300_context(util_blitter_get_pipe(blitter)); unsigned last_sprite_coord_enable = r300->sprite_coord_enable; @@ -1196,7 +1196,7 @@ static void r300_blitter_draw_rectangle(struct blitter_context *blitter, type == UTIL_BLITTER_ATTRIB_COLOR || !r300->draw ? 8 : 4; unsigned dwords = 13 + vertex_size + (type == UTIL_BLITTER_ATTRIB_TEXCOORD ? 7 : 0); - const float zeros[4] = {0, 0, 0, 0}; + static const union pipe_color_union zeros; CS_LOCALS(r300); if (r300->skip_rendering) @@ -1227,10 +1227,10 @@ static void r300_blitter_draw_rectangle(struct blitter_context *blitter, OUT_CS_REG(R300_GB_ENABLE, R300_GB_POINT_STUFF_ENABLE | (R300_GB_TEX_STR << R300_GB_TEX0_SOURCE_SHIFT)); OUT_CS_REG_SEQ(R300_GA_POINT_S0, 4); - OUT_CS_32F(attrib[0]); - OUT_CS_32F(attrib[3]); - OUT_CS_32F(attrib[2]); - OUT_CS_32F(attrib[1]); + OUT_CS_32F(attrib->f[0]); + OUT_CS_32F(attrib->f[3]); + OUT_CS_32F(attrib->f[2]); + OUT_CS_32F(attrib->f[1]); } /* Set up VAP controls. */ @@ -1253,8 +1253,8 @@ static void r300_blitter_draw_rectangle(struct blitter_context *blitter, if (vertex_size == 8) { if (!attrib) - attrib = zeros; - OUT_CS_TABLE(attrib, 4); + attrib = &zeros; + OUT_CS_TABLE(attrib->f, 4); } END_CS; @@ -1273,7 +1273,7 @@ static void r300_resource_resolve(struct pipe_context *pipe, struct r300_context *r300 = r300_context(pipe); struct pipe_surface *srcsurf, *dstsurf, surf_tmpl; struct r300_aa_state *aa = (struct r300_aa_state*)r300->aa_state.state; - float color[] = {0, 0, 0, 0}; + static const union pipe_color_union color; memset(&surf_tmpl, 0, sizeof(surf_tmpl)); surf_tmpl.format = info->src.res->format; @@ -1301,7 +1301,7 @@ static void r300_resource_resolve(struct pipe_context *pipe, /* Resolve the surface. */ /* XXX: y1 < 0 ==> Y flip */ r300->context.clear_render_target(pipe, - srcsurf, color, 0, 0, + srcsurf, &color, 0, 0, info->dst.x1 - info->dst.x0, info->dst.y1 - info->dst.y0); |