microsoft/compiler: textureLoad() doesn't take a LOD on MS textures

Make sure the LOD is zero in that case.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13993>
This commit is contained in:
Boris Brezillon 2021-12-08 10:50:41 +01:00 committed by Marge Bot
parent 951fd35012
commit a4c8508c37

View file

@ -4640,6 +4640,11 @@ emit_tex(struct ntd_context *ctx, nir_tex_instr *instr)
case nir_tex_src_lod:
assert(nir_src_num_components(instr->src[i].src) == 1);
if (instr->op == nir_texop_txf_ms) {
assert(nir_src_as_int(instr->src[i].src) == 0);
break;
}
/* Buffers don't have a LOD */
if (instr->sampler_dim != GLSL_SAMPLER_DIM_BUF)
params.lod_or_sample = get_src(ctx, &instr->src[i].src, 0, type);