d3d12: Cache a modifyable copy of the nir options in d3d12_screen

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14837>
This commit is contained in:
Jesse Natalie
2022-01-28 12:37:23 -08:00
committed by Marge Bot
parent 2529a0df89
commit 944832d3d7
8 changed files with 33 additions and 29 deletions

View File

@@ -620,7 +620,7 @@ get_stencil_resolve_vs(struct d3d12_context *ctx)
return ctx->stencil_resolve_vs;
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_VERTEX,
dxil_get_nir_compiler_options(),
&d3d12_screen(ctx->base.screen)->nir_options,
"linear_blit_vs");
const struct glsl_type *vec4 = glsl_vec4_type();
@@ -651,7 +651,7 @@ get_stencil_resolve_fs(struct d3d12_context *ctx, bool no_flip)
return ctx->stencil_resolve_fs_no_flip;
nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_FRAGMENT,
dxil_get_nir_compiler_options(),
&d3d12_screen(ctx->base.screen)->nir_options,
no_flip ? "stencil_resolve_fs_no_flip" : "stencil_resolve_fs");
nir_variable *stencil_out = nir_variable_create(b.shader,