On Thu, May 10, 2018 at 10:58 AM, Roland Scheidegger <srol...@vmware.com>
wrote:

> 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.
>

The Witcher1 issue isn't even about buffers. It uses out-of-bounds indexing
on uniform arrays. So ARB_robust_buffer_access_behavior doesn't apply.

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

Reply via email to