llvmpipe: only read 0 for channels being read
authorDave Airlie <airlied@redhat.com>
Wed, 12 Aug 2020 05:48:42 +0000 (15:48 +1000)
committerMarge Bot <eric+marge@anholt.net>
Sun, 16 Aug 2020 06:08:34 +0000 (06:08 +0000)
commit430e3310e2aed924dc4e0729644e629007d73ef7
treeb5ee6284f23118bc3cfdfd2f063636979d704fc1
parentf1001a38275fc4bcc2491b58237a12dec08c621d
llvmpipe: only read 0 for channels being read

KHR-GL45.robust_buffer_access_behavior.vertex_buffer_objects
on the CTS 4.6.0 branch and this fixes it.

Roland identified that if the vertex format doesn't contain channels
then we shouldn't be overriding them to 0, so RGB fetch out of bounds
should return 0 for RGB, but the A channel should still be getting back
1.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6287>
src/gallium/auxiliary/draw/draw_llvm.c