microsoft/compiler: Misc fixes caught by GCC

* Fix const-correctness on dxil_mdnode pointer arrays
* Fix warning for a missing scope in a case block

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7780>
This commit is contained in:
Jesse Natalie
2020-12-01 08:44:40 -08:00
committed by Marge Bot
parent 456620a6ad
commit e593329b0c
5 changed files with 17 additions and 16 deletions

View File

@@ -88,17 +88,18 @@ load_comps_to_vec32(nir_builder *b, unsigned src_bit_size,
vec32comps[i] = src_comps[i];
break;
case 16:
case 8:
case 8: {
unsigned src_offs = i * comps_per32b;
vec32comps[i] = nir_u2u32(b, src_comps[src_offs]);
for (unsigned j = 1; j < comps_per32b && src_offs + j < num_src_comps; j++) {
nir_ssa_def *tmp = nir_ishl(b, nir_u2u32(b, src_comps[src_offs + j]),
nir_imm_int(b, j * src_bit_size));
vec32comps[i] = nir_ior(b, vec32comps[i], tmp);
nir_ssa_def *tmp = nir_ishl(b, nir_u2u32(b, src_comps[src_offs + j]),
nir_imm_int(b, j * src_bit_size));
vec32comps[i] = nir_ior(b, vec32comps[i], tmp);
}
break;
}
}
}
return nir_vec(b, vec32comps, num_vec32comps);