mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-29 01:08:12 +02:00
Direct3D and Vulkan's robustBufferAccess2 feature mandate that index buffer out-of-bounds reads should return a zero index (ie, vertex at index zero, not to be confused with a vertex with zero attributes, as the kind resulting in vertex buffer out-of-bounds read.) lavapipe was adding index_offset and start index together without overflow checks, and if start index was sufficient large (as is the case with WHCK wgf11draw which sets start index to (UINT)-5) it would cause to wrap around causing fetches that should be out of bounds wrap around and fetch inside bounds. This change fixes this by doing a clamped add. This ensures start index is set to UINT32_MAX on overflow, which is sufficient in practice to trigger draw index OOB code-paths, yield zero index to be returned. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19683> |
||
|---|---|---|
| .. | ||
| clover | ||
| d3d10umd | ||
| dri | ||
| glx/xlib | ||
| hgl | ||
| lavapipe | ||
| nine | ||
| omx | ||
| osmesa | ||
| rusticl | ||
| va | ||
| vdpau | ||
| wgl | ||
| xa | ||