diff options
author | Charmaine Lee <[email protected]> | 2017-09-01 12:34:01 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-09-05 10:31:18 -0600 |
commit | c12ef63b6940d35584ca8a808c70ee926a02569d (patch) | |
tree | 585bc0b07b991201abfed5a50329b349e48de5f2 /src/gallium/drivers/svga | |
parent | 98badd7f6eaa0ac3ad3d5375f084b84172bb7582 (diff) |
svga: move index buffer bind flag assertion
The buffer bind flags can be promoted in svga_buffer_handle(), so
move the assertion after it. This has already been done for
vertex buffer in commit 6b4bf7e8be, but it misses the one for
index buffer.
Fixes assertion running WarThunder.
Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_draw.c b/src/gallium/drivers/svga/svga_draw.c index 0639d5eaebe..5771903955f 100644 --- a/src/gallium/drivers/svga/svga_draw.c +++ b/src/gallium/drivers/svga/svga_draw.c @@ -589,12 +589,12 @@ draw_vgpu10(struct svga_hwtnl *hwtnl, if (ib) { struct svga_buffer *sbuf = svga_buffer(ib); - assert(sbuf->key.flags & SVGA3D_SURFACE_BIND_INDEX_BUFFER); - (void) sbuf; /* silence unused var warning */ - ib_handle = svga_buffer_handle(svga, ib, PIPE_BIND_INDEX_BUFFER); if (!ib_handle) return PIPE_ERROR_OUT_OF_MEMORY; + + assert(sbuf->key.flags & SVGA3D_SURFACE_BIND_INDEX_BUFFER); + (void) sbuf; /* silence unused var warning */ } else { ib_handle = NULL; |