Mesa (main): d3d12: Retrieve validator version

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jul 23 15:39:15 UTC 2022


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

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Sun Jul 17 11:08:13 2022 -0700

d3d12: Retrieve validator version

For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>

---

 src/gallium/drivers/d3d12/d3d12_compiler.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/d3d12/d3d12_compiler.cpp b/src/gallium/drivers/d3d12/d3d12_compiler.cpp
index 60f6761c002..facd2f6640e 100644
--- a/src/gallium/drivers/d3d12/d3d12_compiler.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_compiler.cpp
@@ -149,7 +149,9 @@ compile_nir(struct d3d12_context *ctx, struct d3d12_shader_selector *sel,
    opts.input_clip_size = key->input_clip_size;
    opts.environment = DXIL_ENVIRONMENT_GL;
    opts.shader_model_max = SHADER_MODEL_6_2;
-   opts.validator_version_max = DXIL_VALIDATOR_1_4;
+#ifdef _WIN32
+   opts.validator_version_max = dxil_get_validator_version(ctx->dxil_validator);
+#endif
 
    struct blob tmp;
    if (!nir_to_dxil(nir, &opts, &tmp)) {



More information about the mesa-commit mailing list