summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-08-17 02:38:23 +0200
committerMarek Olšák <[email protected]>2017-09-11 02:10:23 +0200
commit43247c440e65e41ea8a7d48249aef66f508601e3 (patch)
treea758eb7f1f6f67c29fc2fac984870052cda337b7 /src/gallium/drivers/r300/r300_render.c
parent7aaf4c73de1ad2526b5cd3ddbeecb687b66f6747 (diff)
gallium/u_blitter: use draw_rectangle callback for layered clears
They are done with instancing. Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index e1fabe45035..1f896da22e9 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -1114,7 +1114,7 @@ struct draw_stage* r300_draw_stage(struct r300_context* r300)
* somewhat inefficient. Instead we use a rectangular point sprite. */
void r300_blitter_draw_rectangle(struct blitter_context *blitter,
int x1, int y1, int x2, int y2,
- float depth,
+ float depth, unsigned num_instances,
enum blitter_attrib_type type,
const union blitter_attrib *attrib)
{
@@ -1131,8 +1131,10 @@ void r300_blitter_draw_rectangle(struct blitter_context *blitter,
/* XXX workaround for a lockup in MSAA resolve on SWTCL chipsets, this
* function most probably doesn't handle type=NONE correctly */
- if (!r300->screen->caps.has_tcl && type == UTIL_BLITTER_ATTRIB_NONE) {
- util_blitter_draw_rectangle(blitter, x1, y1, x2, y2, depth, type, attrib);
+ if ((!r300->screen->caps.has_tcl && type == UTIL_BLITTER_ATTRIB_NONE) ||
+ num_instances > 1) {
+ util_blitter_draw_rectangle(blitter, x1, y1, x2, y2, depth,
+ num_instances, type, attrib);
return;
}