From 4d257929daa08b1c7f19fc63b4de24a25e763124 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Sun, 17 Jul 2022 10:22:02 -0700 Subject: [PATCH] microsoft/compiler: Set the barycentrics flag for attribute_at_vertex Reviewed-by: Erik Faye-Lund Part-of: --- 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";