microsoft/compiler: Fix LOD instruction to return 2 values

Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14161>
This commit is contained in:
Jesse Natalie 2021-12-10 15:03:32 -08:00
parent 8926cfc9f7
commit 8371591dc6
2 changed files with 7 additions and 9 deletions

View File

@ -5754,10 +5754,6 @@ spec/arb_tessellation_shader/linker/no-vs: skip
spec/arb_tessellation_shader/linker/tcs-no-vs: skip
spec/arb_tessellation_shader/linker/tcs-output-size-declared-in-other-shader: skip
spec/arb_tessellation_shader/linker/tes-no-vs: skip
spec/arb_texture_query_lod/execution/fs-texturequerylod-linear: crash
spec/arb_texture_query_lod/execution/fs-texturequerylod-nearest: crash
spec/arb_texture_query_lod/execution/fs-texturequerylod-nearest-biased: crash
spec/arb_texture_query_lod/execution/fs-texturequerylod-no-mipmap: crash
spec/arb_uniform_buffer_object/2-buffers-bug: fail
spec/arb_uniform_buffer_object/execution/fs-array-of-structs-std140-indirect: fail
spec/arb_vertex_attrib_64bit/execution/vs-fp64-input-trunc: skip
@ -13041,9 +13037,9 @@ spec/oes_viewport_array/viewport-gs-writes-out-of-range: skip
summary:
name: results
---- --------
pass: 7204
pass: 7208
fail: 58
crash: 27
crash: 23
skip: 12930
timeout: 0
warn: 25

View File

@ -3854,7 +3854,7 @@ emit_texel_fetch(struct ntd_context *ctx, struct texop_parameters *params)
}
static const struct dxil_value *
emit_texture_lod(struct ntd_context *ctx, struct texop_parameters *params)
emit_texture_lod(struct ntd_context *ctx, struct texop_parameters *params, bool clamped)
{
const struct dxil_func *func = dxil_get_function(&ctx->mod, "dx.op.calculateLOD", DXIL_F32);
if (!func)
@ -3867,7 +3867,7 @@ emit_texture_lod(struct ntd_context *ctx, struct texop_parameters *params)
params->coord[0],
params->coord[1],
params->coord[2],
dxil_module_get_int1_const(&ctx->mod, 1)
dxil_module_get_int1_const(&ctx->mod, clamped ? 1 : 0)
};
return dxil_emit_call(&ctx->mod, func, args, ARRAY_SIZE(args));
@ -4060,8 +4060,10 @@ emit_tex(struct ntd_context *ctx, nir_tex_instr *instr)
break;
case nir_texop_lod:
sample = emit_texture_lod(ctx, &params);
sample = emit_texture_lod(ctx, &params, true);
store_dest(ctx, &instr->dest, 0, sample, nir_alu_type_get_base_type(instr->dest_type));
sample = emit_texture_lod(ctx, &params, false);
store_dest(ctx, &instr->dest, 1, sample, nir_alu_type_get_base_type(instr->dest_type));
return true;
case nir_texop_query_levels: