mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
microsoft/compiler: Emit SRVs/UAVs as arrays
This is done regardless of size so that "dynamic" indexing with a uniform can work even on arrays of size 1. Reviewed-by: Sil Vilerino <sivileri@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14342>
This commit is contained in:
parent
e3c14cf718
commit
c9719b6d2e
1 changed files with 2 additions and 0 deletions
|
|
@ -867,6 +867,7 @@ emit_srv(struct ntd_context *ctx, nir_variable *var, unsigned count)
|
|||
res_type = DXIL_RES_SRV_TYPED;
|
||||
}
|
||||
const struct dxil_type *res_type_as_type = dxil_module_get_res_type(&ctx->mod, res_kind, comp_type, false /* readwrite */);
|
||||
res_type_as_type = dxil_module_get_array_type(&ctx->mod, res_type_as_type, count);
|
||||
const struct dxil_mdnode *srv_meta = emit_srv_metadata(&ctx->mod, res_type_as_type, var->name,
|
||||
&layout, comp_type, res_kind);
|
||||
|
||||
|
|
@ -939,6 +940,7 @@ emit_uav(struct ntd_context *ctx, unsigned binding, unsigned space, unsigned cou
|
|||
resource_array_layout layout = { id, binding, count, space };
|
||||
|
||||
const struct dxil_type *res_type = dxil_module_get_res_type(&ctx->mod, res_kind, comp_type, true /* readwrite */);
|
||||
res_type = dxil_module_get_array_type(&ctx->mod, res_type, count);
|
||||
const struct dxil_mdnode *uav_meta = emit_uav_metadata(&ctx->mod, res_type, name,
|
||||
&layout, comp_type, res_kind);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue