microsoft/compiler: Fix Layer type

DXIL wants a uint, but we get passed an int.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
This commit is contained in:
Boris Brezillon 2022-06-14 22:23:18 +02:00 committed by Marge Bot
parent afb64e10c1
commit 9c45ee3f86

View file

@ -5730,11 +5730,11 @@ nir_to_dxil(struct nir_shader *s, const struct nir_to_dxil_options *opts,
if (s->info.stage <= MESA_SHADER_FRAGMENT) {
uint64_t in_mask =
s->info.stage == MESA_SHADER_VERTEX ?
0 : (VARYING_BIT_PRIMITIVE_ID | VARYING_BIT_VIEWPORT);
0 : (VARYING_BIT_PRIMITIVE_ID | VARYING_BIT_VIEWPORT | VARYING_BIT_LAYER);
uint64_t out_mask =
s->info.stage == MESA_SHADER_FRAGMENT ?
((1ull << FRAG_RESULT_STENCIL) | (1ull << FRAG_RESULT_SAMPLE_MASK)) :
(VARYING_BIT_PRIMITIVE_ID | VARYING_BIT_VIEWPORT);
(VARYING_BIT_PRIMITIVE_ID | VARYING_BIT_VIEWPORT | VARYING_BIT_LAYER);
NIR_PASS_V(s, dxil_nir_fix_io_uint_type, in_mask, out_mask);
}