d3d12: fix code after simple-shader helper changes
Fixes:4e9328e3b6
("nir_builder: Return a new builder from nir_builder_init_simple_shader().") Fixes:5f992802f5
("nir/builder: Drop the mem_ctx arg from nir_builder_init_simple_shader().") Fixes:eda3e4e055
("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:

committed by
Marge Bot

parent
5f99962540
commit
5d2e9d76c1
@@ -612,10 +612,9 @@ get_stencil_resolve_vs(struct d3d12_context *ctx)
|
|||||||
if (ctx->stencil_resolve_vs)
|
if (ctx->stencil_resolve_vs)
|
||||||
return ctx->stencil_resolve_vs;
|
return ctx->stencil_resolve_vs;
|
||||||
|
|
||||||
nir_builder b;
|
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_VERTEX,
|
||||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_VERTEX,
|
dxil_get_nir_compiler_options(),
|
||||||
dxil_get_nir_compiler_options());
|
"linear_blit_vs");
|
||||||
b.shader->info.name = ralloc_strdup(b.shader, "linear_blit_vs");
|
|
||||||
|
|
||||||
const struct glsl_type *vec4 = glsl_vec4_type();
|
const struct glsl_type *vec4 = glsl_vec4_type();
|
||||||
nir_variable *pos_in = nir_variable_create(b.shader, nir_var_shader_in,
|
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)
|
if (ctx->stencil_resolve_fs)
|
||||||
return ctx->stencil_resolve_fs;
|
return ctx->stencil_resolve_fs;
|
||||||
|
|
||||||
nir_builder b;
|
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_FRAGMENT,
|
||||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_FRAGMENT,
|
dxil_get_nir_compiler_options(),
|
||||||
dxil_get_nir_compiler_options());
|
"stencil_resolve_fs");
|
||||||
|
|
||||||
nir_variable *stencil_out = nir_variable_create(b.shader,
|
nir_variable *stencil_out = nir_variable_create(b.shader,
|
||||||
nir_var_shader_out,
|
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;
|
struct d3d12_shader_selector *gs;
|
||||||
uint64_t varyings = key->varyings.mask;
|
uint64_t varyings = key->varyings.mask;
|
||||||
nir_builder b;
|
|
||||||
nir_shader *nir;
|
nir_shader *nir;
|
||||||
nir_intrinsic_instr *instr;
|
nir_intrinsic_instr *instr;
|
||||||
struct pipe_shader_state templ;
|
struct pipe_shader_state templ;
|
||||||
|
|
||||||
nir_builder_init_simple_shader(&b, NULL, MESA_SHADER_GEOMETRY,
|
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_GEOMETRY,
|
||||||
dxil_get_nir_compiler_options());
|
dxil_get_nir_compiler_options(),
|
||||||
|
"passthrough");
|
||||||
|
|
||||||
nir = b.shader;
|
nir = b.shader;
|
||||||
nir->info.inputs_read = varyings;
|
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.vertices_out = 1;
|
||||||
nir->info.gs.invocations = 1;
|
nir->info.gs.invocations = 1;
|
||||||
nir->info.gs.active_stream_mask = 1;
|
nir->info.gs.active_stream_mask = 1;
|
||||||
nir->info.name = ralloc_strdup(nir, "passthrough");
|
|
||||||
|
|
||||||
/* Copy inputs to outputs. */
|
/* Copy inputs to outputs. */
|
||||||
while (varyings) {
|
while (varyings) {
|
||||||
@@ -173,8 +172,9 @@ d3d12_begin_emit_primitives_gs(struct emit_primitives_context *emit_ctx,
|
|||||||
|
|
||||||
emit_ctx->ctx = ctx;
|
emit_ctx->ctx = ctx;
|
||||||
|
|
||||||
nir_builder_init_simple_shader(b, NULL, MESA_SHADER_GEOMETRY,
|
emit_ctx->b = nir_builder_init_simple_shader(MESA_SHADER_GEOMETRY,
|
||||||
dxil_get_nir_compiler_options());
|
dxil_get_nir_compiler_options(),
|
||||||
|
"edgeflags");
|
||||||
|
|
||||||
nir_shader *nir = b->shader;
|
nir_shader *nir = b->shader;
|
||||||
nir->info.inputs_read = varyings;
|
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.vertices_out = vertices_out;
|
||||||
nir->info.gs.invocations = 1;
|
nir->info.gs.invocations = 1;
|
||||||
nir->info.gs.active_stream_mask = 1;
|
nir->info.gs.active_stream_mask = 1;
|
||||||
nir->info.name = ralloc_strdup(nir, "edgeflags");
|
|
||||||
|
|
||||||
while (varyings) {
|
while (varyings) {
|
||||||
char tmp[100];
|
char tmp[100];
|
||||||
|
Reference in New Issue
Block a user