From: Brian Paul Date: Fri, 30 Jun 2017 21:07:08 +0000 (-0700) Subject: svga: move assertion in draw_vgpu10() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6b4bf7e8be3cc0f350c701efa67313197881cf99;p=mesa.git 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 --- 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;