mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2025-02-19 09:31:05 +00:00
d3d12: fix code after simple-shader helper changes
Fixes: 4e9328e3b6a ("nir_builder: Return a new builder from nir_builder_init_simple_shader().") Fixes: 5f992802f51 ("nir/builder: Drop the mem_ctx arg from nir_builder_init_simple_shader().") Fixes: eda3e4e055e ("nir/builder: Add a name format arg to nir_builder_init_simple_shader().") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7574>
This commit is contained in:
parent
5f99962540
commit
5d2e9d76c1
@ -612,10 +612,9 @@ get_stencil_resolve_vs(struct d3d12_context *ctx)
|
||||
if (ctx->stencil_resolve_vs)
|
||||
return ctx->stencil_resolve_vs;
|
||||
|
||||
nir_builder b;
|
||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_VERTEX,
|
||||
dxil_get_nir_compiler_options());
|
||||
b.shader->info.name = ralloc_strdup(b.shader, "linear_blit_vs");
|
||||
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_VERTEX,
|
||||
dxil_get_nir_compiler_options(),
|
||||
"linear_blit_vs");
|
||||
|
||||
const struct glsl_type *vec4 = glsl_vec4_type();
|
||||
nir_variable *pos_in = nir_variable_create(b.shader, nir_var_shader_in,
|
||||
@ -641,9 +640,9 @@ get_stencil_resolve_fs(struct d3d12_context *ctx)
|
||||
if (ctx->stencil_resolve_fs)
|
||||
return ctx->stencil_resolve_fs;
|
||||
|
||||
nir_builder b;
|
||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT,
|
||||
dxil_get_nir_compiler_options());
|
||||
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_FRAGMENT,
|
||||
dxil_get_nir_compiler_options(),
|
||||
"stencil_resolve_fs");
|
||||
|
||||
nir_variable *stencil_out = nir_variable_create(b.shader,
|
||||
nir_var_shader_out,
|
||||
|
@ -78,13 +78,13 @@ d3d12_make_passthrough_gs(struct d3d12_context *ctx, struct d3d12_gs_variant_key
|
||||
{
|
||||
struct d3d12_shader_selector *gs;
|
||||
uint64_t varyings = key->varyings.mask;
|
||||
nir_builder b;
|
||||
nir_shader *nir;
|
||||
nir_intrinsic_instr *instr;
|
||||
struct pipe_shader_state templ;
|
||||
|
||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_GEOMETRY,
|
||||
dxil_get_nir_compiler_options());
|
||||
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_GEOMETRY,
|
||||
dxil_get_nir_compiler_options(),
|
||||
"passthrough");
|
||||
|
||||
nir = b.shader;
|
||||
nir->info.inputs_read = varyings;
|
||||
@ -95,7 +95,6 @@ d3d12_make_passthrough_gs(struct d3d12_context *ctx, struct d3d12_gs_variant_key
|
||||
nir->info.gs.vertices_out = 1;
|
||||
nir->info.gs.invocations = 1;
|
||||
nir->info.gs.active_stream_mask = 1;
|
||||
nir->info.name = ralloc_strdup(nir, "passthrough");
|
||||
|
||||
/* Copy inputs to outputs. */
|
||||
while (varyings) {
|
||||
@ -173,8 +172,9 @@ d3d12_begin_emit_primitives_gs(struct emit_primitives_context *emit_ctx,
|
||||
|
||||
emit_ctx->ctx = ctx;
|
||||
|
||||
nir_builder_init_simple_shader(b, NULL, MESA_SHADER_GEOMETRY,
|
||||
dxil_get_nir_compiler_options());
|
||||
emit_ctx->b = nir_builder_init_simple_shader(MESA_SHADER_GEOMETRY,
|
||||
dxil_get_nir_compiler_options(),
|
||||
"edgeflags");
|
||||
|
||||
nir_shader *nir = b->shader;
|
||||
nir->info.inputs_read = varyings;
|
||||
@ -185,7 +185,6 @@ d3d12_begin_emit_primitives_gs(struct emit_primitives_context *emit_ctx,
|
||||
nir->info.gs.vertices_out = vertices_out;
|
||||
nir->info.gs.invocations = 1;
|
||||
nir->info.gs.active_stream_mask = 1;
|
||||
nir->info.name = ralloc_strdup(nir, "edgeflags");
|
||||
|
||||
while (varyings) {
|
||||
char tmp[100];
|
||||
|
Loading…
x
Reference in New Issue
Block a user