aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_draw_elements.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga/svga_draw_elements.c')
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index f9bb13664f5..b1db8710740 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -242,21 +242,21 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
prim, gen_prim,
count, gen_nr, gen_size,
gen_func, &gen_buf);
- if (ret != PIPE_OK)
- goto done;
-
- ret = svga_hwtnl_simple_draw_range_elements(hwtnl,
- gen_buf,
- gen_size,
- index_bias,
- min_index,
- max_index,
- gen_prim, 0, gen_nr,
- start_instance,
- instance_count);
-done:
- if (gen_buf)
+ if (ret == PIPE_OK) {
+ ret = svga_hwtnl_simple_draw_range_elements(hwtnl,
+ gen_buf,
+ gen_size,
+ index_bias,
+ min_index,
+ max_index,
+ gen_prim, 0, gen_nr,
+ start_instance,
+ instance_count);
+ }
+
+ if (gen_buf) {
pipe_resource_reference(&gen_buf, NULL);
+ }
}
SVGA_STATS_TIME_POP(svga_sws(hwtnl->svga));