llvmpipe/draw: handle constant buffer limits and robustness (v1.1)
authorDave Airlie <airlied@redhat.com>
Sun, 29 Dec 2019 23:59:28 +0000 (09:59 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jul 2020 00:04:49 +0000 (00:04 +0000)
commit12c06a0deb632728f76ceb480e86151b8f96100e
tree07e412b3250df2a0310ae28727b32f705633c55a
parentf0c3a258003ea8655bc05a0a0febf93ffb1a0736
llvmpipe/draw: handle constant buffer limits and robustness (v1.1)

TGSI expect vec4 of constants for it's current code paths, and when
doing indirect accesses it does the comparison on vec4 indexes,
however NIR does the indexing on packed float indexes.

This also align the compute path with the other shaders, and
should improve robustness (at least under Vulkan)

Fixes:
KHR-NoContext.gl43.robust_buffer_access_behavior.uniform_buffer

v1.1:
rename variable to something more meaningful (Roland)

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5971>
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_private.h
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c
src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c
src/gallium/drivers/llvmpipe/lp_context.c
src/gallium/drivers/llvmpipe/lp_screen.h
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_state_cs.c