[Mesa-dev] [PATCH v2] i965: do not emit empty surface state
Erik Faye-Lund
erik.faye-lund at collabora.com
Tue Aug 14 22:18:16 UTC 2018
Quoting the original patch:
---8<---
This fixes an assert that triggers for me when running
dEQP-GLES31.functional.shaders.opaque_type_indexing.ssbo.const_literal_vertex
on top of a debug-build of mesa on top of i965. Since setting up a virgl
setup is rather convoluted, here's a piglit shader-test that reproduce
it
directly on top of a debug-build of mesa on i965:
https://gitlab.freedesktop.org/kusma/piglit/tree/ssbo-zero-size
---8<---
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.
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.
On Wed, Aug 15, 2018 at 12:11 AM, Lionel Landwerlin
<lionel.g.landwerlin at intel.com> wrote:
> 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:
>> On 07/08/18 20:31, Erik Faye-Lund wrote:
>>> 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 <erik.faye-lund at collabora.com>
>>
>> Looks good to me. Maybe Ken can confirm?
>>
>> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>>
>>> ---
>>>
>>> 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 =
>>
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180815/bed6b0eb/attachment.html>
More information about the mesa-dev
mailing list