Mesa (master): i965: do not emit empty surface state
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 15 22:23:42 UTC 2018
Module: Mesa
Branch: master
Commit: da1f7c56dabc52a293235dc97101342c3a242e4b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da1f7c56dabc52a293235dc97101342c3a242e4b
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue Aug 7 21:31:20 2018 +0200
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 <erik.faye-lund at collabora.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 5 +++++
1 file changed, 5 insertions(+)
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 9397b637c7..2aef0ef59f 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 =
More information about the mesa-commit
mailing list