From 6b4bf7e8be3cc0f350c701efa67313197881cf99 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 30 Jun 2017 14:07:08 -0700 Subject: [PATCH] svga: move assertion in draw_vgpu10() The buffer binding flags aren't ensured until after the svga_buffer_handle() call, so move the assertion after it. Reviewed-by: Charmaine Lee --- src/gallium/drivers/svga/svga_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 6510c424433..5919bd35dae 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -548,9 +548,9 @@ draw_vgpu10(struct svga_hwtnl *hwtnl, struct svga_buffer *sbuf = svga_buffer(hwtnl->cmd.vbufs[i].buffer.resource); if (sbuf) { - assert(sbuf->key.flags & SVGA3D_SURFACE_BIND_VERTEX_BUFFER); vbuffer_handles[i] = svga_buffer_handle(svga, &sbuf->b.b, PIPE_BIND_VERTEX_BUFFER); + assert(sbuf->key.flags & SVGA3D_SURFACE_BIND_VERTEX_BUFFER); if (vbuffer_handles[i] == NULL) return PIPE_ERROR_OUT_OF_MEMORY; vbuffers[i] = &sbuf->b.b; -- 2.30.2