<div id="geary-body" dir="auto"><div>Quoting the original patch:</div><div><br></div><div>---8<---</div>This fixes an assert that triggers for me when running<div>dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex</div><div>on top of a debug-build of mesa on top of i965. Since setting up a virgl</div><div>setup is rather convoluted, here's a piglit shader-test that reproduce it</div><div>directly on top of a debug-build of mesa on i965:</div><div><br></div><div><a href="https://gitlab.freedesktop.org/kusma/piglit/tree/ssbo-zero-size">https://gitlab.freedesktop.org/kusma/piglit/tree/ssbo-zero-size</a></div><div>---8<---</div><div><br></div><div>So yeah, that last link should give you an application that reproduce this. Do note that this only triggers with a debug-build of Mesa.</div><div><br></div><div>I might not have phrased this clearly in the quoted text, but the initial reproduction was from within a virual machine running virgl, which crashed the
VM. That's a pretty convoluted setup, so the stand-alone virgl case should be much easier to work with.</div><div><br></div></div><div id="geary-quote" dir="auto"><br>On Wed, Aug 15, 2018 at 12:11 AM, Lionel Landwerlin <lionel.g.landwerlin@intel.com> wrote:<br><blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">Hey Erik,
Out of curiosity, what app/test managed to run into this assert?
We could have some test added :)
Thanks,
-
Lionel
On 08/08/18 09:34, Lionel Landwerlin wrote:
<blockquote>On 07/08/18 20:31, Erik Faye-Lund wrote:
<blockquote>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.
Signed-off-by: Erik Faye-Lund <<a href="mailto:erik.faye-lund@collabora.com">erik.faye-lund@collabora.com</a>>
</blockquote>
Looks good to me. Maybe Ken can confirm?
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a>>
<blockquote>---
Here's an updated patch.
v2: call emit_null_surface_state to ensure out_offset is initialized
properly. (Lionel)
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 =
</blockquote>
_______________________________________________
mesa-dev mailing list
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</blockquote>
</div></blockquote></div>