From efc47571d4f952e597eea95deba4ecdc4eb7bc56 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 21 Dec 2021 18:15:29 -0800 Subject: [PATCH] microsoft/compiler: Hook up uavs-at-every-stage flag Reviewed-by: Sil Vilerino Part-of: --- src/microsoft/compiler/nir_to_dxil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/microsoft/compiler/nir_to_dxil.c b/src/microsoft/compiler/nir_to_dxil.c index 3b86087d682..234239c2485 100644 --- a/src/microsoft/compiler/nir_to_dxil.c +++ b/src/microsoft/compiler/nir_to_dxil.c @@ -950,6 +950,9 @@ emit_uav(struct ntd_context *ctx, unsigned binding, unsigned space, unsigned cou add_resource(ctx, res_kind == DXIL_RESOURCE_KIND_RAW_BUFFER ? DXIL_RES_UAV_RAW : DXIL_RES_UAV_TYPED, &layout); if (res_kind == DXIL_RESOURCE_KIND_RAW_BUFFER) ctx->mod.raw_and_structured_buffers = true; + if (ctx->mod.shader_kind != DXIL_PIXEL_SHADER && + ctx->mod.shader_kind != DXIL_COMPUTE_SHADER) + ctx->mod.feats.uavs_at_every_stage = true; if (!ctx->opts->vulkan_environment) { for (unsigned i = 0; i < count; ++i) { @@ -1233,6 +1236,8 @@ get_module_flags(struct ntd_context *ctx) flags |= (1 << 13); if (ctx->mod.feats.use_64uavs) flags |= (1 << 15); + if (ctx->mod.feats.uavs_at_every_stage) + flags |= (1 << 16); if (ctx->mod.feats.cs_4x_raw_sb) flags |= (1 << 17); if (ctx->mod.feats.wave_ops)