Mesa (main): microsoft/compiler: fix psv-output calculation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Aug 5 10:04:06 UTC 2021


Module: Mesa
Branch: main
Commit: 63dae1bd8b02ac6bc9e9a6bd4af118ca07c14317
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=63dae1bd8b02ac6bc9e9a6bd4af118ca07c14317

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Aug  4 13:49:35 2021 +0200

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 at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12197>

---

 .gitlab-ci/windows/quick_gl.txt         | 5 ++---
 src/microsoft/compiler/dxil_signature.c | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci/windows/quick_gl.txt b/.gitlab-ci/windows/quick_gl.txt
index 89a582ead2c..2810d5a4bdc 100644
--- a/.gitlab-ci/windows/quick_gl.txt
+++ b/.gitlab-ci/windows/quick_gl.txt
@@ -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/vs, gs 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/clearbuffer-depth-cs-probe: skip
 spec/!opengl 3.0/required-sized-texture-formats: fail
@@ -4753,9 +4752,9 @@ wgl/wgl-sanity: skip
 summary:
        name:  results
        ----  --------
-       pass:    13299
+       pass:    13300
        fail:      538
-      crash:       68
+      crash:       67
        skip:     4126
     timeout:        0
        warn:       10
diff --git a/src/microsoft/compiler/dxil_signature.c b/src/microsoft/compiler/dxil_signature.c
index ed6ebdf412a..71fca207459 100644
--- a/src/microsoft/compiler/dxil_signature.c
+++ b/src/microsoft/compiler/dxil_signature.c
@@ -579,8 +579,8 @@ get_output_signature(struct dxil_module *mod, nir_shader *s, bool vulkan)
 
       ++num_outputs;
 
-      if (!is_depth_output(semantic.kind))
-         ++mod->num_psv_outputs;
+      mod->num_psv_outputs = MAX2(mod->num_psv_outputs,
+                                  semantic.start_row + semantic.rows);
 
       assert(num_outputs < ARRAY_SIZE(outputs));
    }



More information about the mesa-commit mailing list