microsoft/compiler: fix psv-output calculation

Rather surprisingly, the value stored in the NumVectors field of the
DXIL PSV header isn't the number of vectors, but rather the *maximum*
vector used.

This makes a difference when we're not writing to the first element of
an array, where we would previously generate a validation error.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197>
This commit is contained in:
Erik Faye-Lund
2021-08-04 13:49:35 +02:00
committed by Marge Bot
parent 50e849fb94
commit 63dae1bd8b
2 changed files with 4 additions and 5 deletions

View File

@@ -364,7 +364,6 @@ spec/!opengl 2.0/vertex-program-two-side/tcs-out, tes and fs: skip
spec/!opengl 2.0/vertex-program-two-side/tes-out and fs: skip spec/!opengl 2.0/vertex-program-two-side/tes-out and fs: skip
spec/!opengl 2.0/vertex-program-two-side/vs, gs and fs: skip spec/!opengl 2.0/vertex-program-two-side/vs, gs and fs: skip
spec/!opengl 2.0/vertex-program-two-side/vs, tcs, tes and fs: skip spec/!opengl 2.0/vertex-program-two-side/vs, tcs, tes and fs: skip
spec/!opengl 2.1/fbo-mrt-alphatest-no-buffer-zero-write: crash
spec/!opengl 3.0/bound-resource-limits: fail spec/!opengl 3.0/bound-resource-limits: fail
spec/!opengl 3.0/clearbuffer-depth-cs-probe: skip spec/!opengl 3.0/clearbuffer-depth-cs-probe: skip
spec/!opengl 3.0/required-sized-texture-formats: fail spec/!opengl 3.0/required-sized-texture-formats: fail
@@ -4753,9 +4752,9 @@ wgl/wgl-sanity: skip
summary: summary:
name: results name: results
---- -------- ---- --------
pass: 13299 pass: 13300
fail: 538 fail: 538
crash: 68 crash: 67
skip: 4126 skip: 4126
timeout: 0 timeout: 0
warn: 10 warn: 10

View File

@@ -579,8 +579,8 @@ get_output_signature(struct dxil_module *mod, nir_shader *s, bool vulkan)
++num_outputs; ++num_outputs;
if (!is_depth_output(semantic.kind)) mod->num_psv_outputs = MAX2(mod->num_psv_outputs,
++mod->num_psv_outputs; semantic.start_row + semantic.rows);
assert(num_outputs < ARRAY_SIZE(outputs)); assert(num_outputs < ARRAY_SIZE(outputs));
} }