Am 10.05.2018 um 16:47 schrieb Ivan Kalvachev:
> On 5/10/18, Roland Scheidegger <srol...@vmware.com> wrote:
>> Quite a sneaky little bug, can't hurt to make undefined behavior a bit
>> more defined :-).
> 
> Actually, this behavior is completely defined in Direct3D,
> where out-of-bound access is expected to
> always return 0.0 .
> This is why Witcher1 has the issue in both Gallium Nine and WineD3D OpenGL.
> (Curiously, only the Linux native OpenGL version of Trine1 EE has that issue.)
> 
> In OpenGL there is "ARB_robust_buffer_access_behavior"
> that Mesa3D claims to support.
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_OpenGL_extensions_ARB_ARB-5Frobust-5Fbuffer-5Faccess-5Fbehavior.txt&d=DwIBaQ&c=uilaK90D4TOVoH58JNXRgQ&r=_QIjpv-UJ77xEQY8fIYoQtr5qv8wKrPJc7v7_-CYAb0&m=HABSbOZm1CI6dmKtNDRaqMEehdOkLSLHDcqhAPZECQo&s=IUJuFond_Xq02RLZJgY8K1CFlBF_pojvx3uMNzW113Q&e=
> 
> Here is a quote that might be relevant to these cases:
> ---
> Add to Section 2.8 "Vertex Arrays" before 2.8.1 (Packed Vertex Data
>     Formats):
> 
>     "Robust buffer access can be enabled by creating a context with robust
>     access enabled through the window system binding APIs. When enabled,
>     indices within the elements array that reference vertex data that
>     lies outside the enabled attributes vertex buffer objects, result in
>     reading zero.[...]
> ---

Vertex arrays.
Buffer objects in general (such as for uniform buffers) can still return
just about anything (albeit not allowed to be data from outside the
buffer, either 0 or any value from inside the buffer). (And for
out-of-bounds it even considers the full buffer, not the bound buffer
range). So a test checking for conformance there wouldn't help.


> It might be good idea to add some piglit test that checks
> to test for that, as some reports say that Tahiti (GCN 1)
> might have issues too.
> 
> All D3D compatible hardware should already support that.
> 
Yes, that's the silver lining here. If the hw (as far as that's pc gpus,
some hw intended for gles might disagree) is correctly told about the
buffer extents, it will likely adhere to d3d rules automatically.

Roland

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to