util/driconf: add Dune: Spice Wars workaround

As per the bug report the game does not correctly handle a uniform
index of -1 being returned for the unused array element, which
results in rendering issues. So here we skip the uniform array
resizing optimisation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6397
Cc: mesa-stable

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20579>
This commit is contained in:
Timothy Arceri
2023-01-09 14:12:52 +11:00
committed by Marge Bot
parent e986d8c337
commit ac5af6c06d
8 changed files with 20 additions and 1 deletions

View File

@@ -1541,7 +1541,7 @@ gl_nir_link_uniforms(const struct gl_constants *consts,
/* Iterate through all linked shaders */
struct nir_link_uniforms_state state = {0,};
if (!prog->data->spirv) {
if (!prog->data->spirv && !consts->DisableUniformArrayResize) {
/* Gather information on uniform use */
for (unsigned stage = 0; stage < MESA_SHADER_STAGES; stage++) {
struct gl_linked_shader *sh = prog->_LinkedShaders[stage];