From a46bcf0a771575ce68e0a0585a84ca6029b96b4e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 5 Oct 2017 02:38:35 +0200 Subject: gallium/u_blitter: let drivers set the vertex elements state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit radeonsi won't set it. Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/r300/r300_render.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r300/r300_render.c') diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index ddd24523ca6..7808669e253 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -1113,6 +1113,7 @@ struct draw_stage* r300_draw_stage(struct r300_context* r300) * would be computed and stored twice, which makes the clear/copy codepaths * somewhat inefficient. Instead we use a rectangular point sprite. */ void r300_blitter_draw_rectangle(struct blitter_context *blitter, + void *vertex_elements_cso, int x1, int y1, int x2, int y2, float depth, unsigned num_instances, enum blitter_attrib_type type, @@ -1134,14 +1135,16 @@ void r300_blitter_draw_rectangle(struct blitter_context *blitter, if ((!r300->screen->caps.has_tcl && type == UTIL_BLITTER_ATTRIB_NONE) || type == UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW || num_instances > 1) { - util_blitter_draw_rectangle(blitter, x1, y1, x2, y2, depth, - num_instances, type, attrib); + util_blitter_draw_rectangle(blitter, vertex_elements_cso, x1, y1, x2, y2, + depth, num_instances, type, attrib); return; } if (r300->skip_rendering) return; + r300->context.bind_vertex_elements_state(&r300->context, vertex_elements_cso); + if (type == UTIL_BLITTER_ATTRIB_TEXCOORD_XY) r300->sprite_coord_enable = 1; -- cgit v1.2.3