mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 04:00:12 +01:00
microsoft/compiler: convert to use nir_foreach_function_with_impl in function emit_module
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23940>
This commit is contained in:
parent
87109c3e1b
commit
d5baad2afa
1 changed files with 3 additions and 7 deletions
|
|
@ -5885,13 +5885,9 @@ emit_scratch(struct ntd_context *ctx, nir_function_impl *impl)
|
|||
}
|
||||
|
||||
static bool
|
||||
emit_function(struct ntd_context *ctx, nir_function *func)
|
||||
emit_function(struct ntd_context *ctx, nir_function *func, nir_function_impl *impl)
|
||||
{
|
||||
assert(func->num_params == 0);
|
||||
nir_function_impl *impl = func->impl;
|
||||
if (!impl)
|
||||
return true;
|
||||
|
||||
nir_metadata_require(impl, nir_metadata_block_index);
|
||||
|
||||
const char *attr_keys[2] = { NULL };
|
||||
|
|
@ -6077,8 +6073,8 @@ emit_module(struct ntd_context *ctx, const struct nir_to_dxil_options *opts)
|
|||
ctx->shader->info.clip_distance_array_size : ctx->opts->input_clip_size;
|
||||
preprocess_signatures(&ctx->mod, ctx->shader, input_clip_size);
|
||||
|
||||
nir_foreach_function(func, ctx->shader) {
|
||||
if (!emit_function(ctx, func))
|
||||
nir_foreach_function_with_impl(func, impl, ctx->shader) {
|
||||
if (!emit_function(ctx, func, impl))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue