diff options
author | Erik Faye-Lund <[email protected]> | 2018-08-07 21:31:20 +0200 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-08-15 23:23:16 +0100 |
commit | da1f7c56dabc52a293235dc97101342c3a242e4b (patch) | |
tree | fb9e8f3a0e44d818197ee106bc0877bac336a118 /src/mesa/drivers | |
parent | 743dff1ccaca06d03e1886c5a51cac782e888765 (diff) |
i965: do not emit empty surface state
If called with an empty size, brw_emit_buffer_surface_state asserts.
We already have a dedicated helper for uploading nothing, so let's use
that instead.
Avoids an assert in
dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex
when running a debug build of i965.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 9397b637c79..2aef0ef59f7 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1322,6 +1322,11 @@ upload_buffer_surface(struct brw_context *brw, if (!binding->AutomaticSize) size = MIN2(size, binding->Size); + if (size == 0) { + emit_null_surface_state(brw, NULL, out_offset); + return; + } + struct intel_buffer_object *iobj = intel_buffer_object(binding->BufferObject); struct brw_bo *bo = |