Module: Mesa Branch: main Commit: efc47571d4f952e597eea95deba4ecdc4eb7bc56 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efc47571d4f952e597eea95deba4ecdc4eb7bc56
Author: Jesse Natalie <[email protected]> Date: Tue Dec 21 18:15:29 2021 -0800 microsoft/compiler: Hook up uavs-at-every-stage flag Reviewed-by: Sil Vilerino <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14294> --- 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)
