Mesa (main): microsoft/compiler: Set the barycentrics flag for attribute_at_vertex

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


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

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Sun Jul 17 10:22:02 2022 -0700

microsoft/compiler: Set the barycentrics flag for attribute_at_vertex

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

---

 src/microsoft/compiler/nir_to_dxil.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c
index bf4983c47fe..aeb51d2a91d 100644
--- a/src/microsoft/compiler/nir_to_dxil.c
+++ b/src/microsoft/compiler/nir_to_dxil.c
@@ -1463,6 +1463,8 @@ get_module_flags(struct ntd_context *ctx)
       flags |= (1 << 19);
    if (ctx->mod.feats.int64_ops)
       flags |= (1 << 20);
+   if (ctx->mod.feats.barycentrics)
+      flags |= (1 << 22);
    if (ctx->mod.feats.stencil_ref)
       flags |= (1 << 11);
    if (ctx->mod.feats.native_low_precision)
@@ -3243,6 +3245,8 @@ emit_load_input_via_intrinsic(struct ntd_context *ctx, nir_intrinsic_instr *intr
    if (attr_at_vertex) {
       opcode_val = DXIL_INTR_ATTRIBUTE_AT_VERTEX;
       func_name = "dx.op.attributeAtVertex";
+      if (ctx->mod.minor_validator >= 6)
+         ctx->mod.feats.barycentrics = 1;
    } else if (is_patch_constant) {
       opcode_val = DXIL_INTR_LOAD_PATCH_CONSTANT;
       func_name = "dx.op.loadPatchConstant";



More information about the mesa-commit mailing list