microsoft/compiler: Separate 'advanced texture ops' from SM6.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35664>
This commit is contained in:
@@ -141,6 +141,7 @@ compile_nir(struct d3d12_context *ctx, struct d3d12_shader_selector *sel,
|
||||
opts.input_clip_size = key->input_clip_size;
|
||||
opts.environment = DXIL_ENVIRONMENT_GL;
|
||||
opts.shader_model_max = screen->max_shader_model;
|
||||
opts.advanced_texture_ops = screen->opts14.AdvancedTextureOpsSupported;
|
||||
#ifdef _WIN32
|
||||
opts.validator_version_max = dxil_get_validator_version(ctx->dxil_validator);
|
||||
#endif
|
||||
|
||||
@@ -5638,7 +5638,7 @@ emit_tex(struct ntd_context *ctx, nir_tex_instr *instr)
|
||||
lod_is_zero = true;
|
||||
FALLTHROUGH;
|
||||
case nir_texop_txl:
|
||||
if (lod_is_zero && params.cmp != NULL && ctx->mod.minor_version < 7) {
|
||||
if ((lod_is_zero || !ctx->opts->advanced_texture_ops) && params.cmp != NULL) {
|
||||
/* Prior to SM 6.7, if the level is constant 0.0, ignore the LOD argument,
|
||||
* so level-less DXIL instructions are used. This is needed to avoid emitting
|
||||
* dx.op.sampleCmpLevel, which would not be available.
|
||||
|
||||
@@ -80,6 +80,7 @@ struct nir_to_dxil_options {
|
||||
bool lower_int16;
|
||||
bool disable_math_refactoring;
|
||||
bool last_ubo_is_not_arrayed;
|
||||
bool advanced_texture_ops;
|
||||
unsigned provoking_vertex;
|
||||
unsigned num_kernel_globals;
|
||||
unsigned input_clip_size;
|
||||
|
||||
@@ -427,6 +427,7 @@ dzn_pipeline_compile_shader(struct dzn_device *device,
|
||||
device->vk.enabled_features.shaderInt16),
|
||||
.shader_model_max = dzn_get_shader_model(pdev),
|
||||
.input_clip_size = input_clip_size,
|
||||
.advanced_texture_ops = pdev->options14.AdvancedTextureOpsSupported,
|
||||
#ifdef _WIN32
|
||||
.validator_version_max = dxil_get_validator_version(instance->dxil_validator),
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user