Module Name: xsrc
Committed By: christos
Date: Wed May 8 16:54:51 UTC 2024
Modified Files:
xsrc/external/mit/MesaLib/dist/src/compiler/nir: nir_lower_blend.c
nir_lower_subgroups.c nir_opt_copy_prop_vars.c
xsrc/external/mit/MesaLib/dist/src/compiler/spirv: spirv_to_nir.c
Log Message:
Add casts to appease clang
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c
cvs rdiff -u -r1.1.1.2 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c
diff -u xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c:1.1.1.1 xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c:1.1.1.1 Sun May 8 21:23:27 2022
+++ xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_blend.c Wed May 8 12:54:50 2024
@@ -375,7 +375,7 @@ nir_lower_blend_instr(nir_builder *b, ni
blended = nir_color_mask(b, options->rt[rt].colormask, blended, dst);
if (src_num_comps != 4)
- blended = nir_channels(b, blended, BITFIELD_MASK(src_num_comps));
+ blended = nir_channels(b, blended, (nir_component_mask_t)BITFIELD_MASK(src_num_comps));
/* Write out the final color instead of the input */
nir_instr_rewrite_src_ssa(instr, &intr->src[1], blended);
Index: xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c
diff -u xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c:1.1.1.2 xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c:1.1.1.2 Sun May 8 21:23:27 2022
+++ xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_lower_subgroups.c Wed May 8 12:54:50 2024
@@ -98,7 +98,7 @@ uint_to_ballot_type(nir_builder *b, nir_
* have enough ballot bits.
*/
if (value->num_components > num_components)
- value = nir_channels(b, value, BITFIELD_MASK(num_components));
+ value = nir_channels(b, value, (nir_component_mask_t)BITFIELD_MASK(num_components));
return value;
}
Index: xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c
diff -u xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c:1.1.1.4 Sun May 8 21:23:28 2022
+++ xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir_opt_copy_prop_vars.c Wed May 8 12:54:50 2024
@@ -191,7 +191,7 @@ gather_vars_written(struct copy_prop_var
nir_deref_instr *payload =
nir_src_as_deref(*nir_get_shader_call_payload_src(intrin));
- nir_component_mask_t mask =
+ nir_component_mask_t mask = (nir_component_mask_t)
BITFIELD_MASK(glsl_get_vector_elements(payload->type));
struct hash_entry *ht_entry =
@@ -1150,7 +1150,7 @@ copy_prop_vars_block(struct copy_prop_va
nir_deref_and_path payload = {
nir_src_as_deref(*nir_get_shader_call_payload_src(intrin)), NULL};
- nir_component_mask_t full_mask =
+ nir_component_mask_t full_mask = (nir_component_mask_t)
BITFIELD_MASK(glsl_get_vector_elements(payload.instr->type));
kill_aliases(state, copies, &payload, full_mask);
break;
Index: xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c
diff -u xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c:1.1.1.4 Sun May 8 21:23:28 2022
+++ xsrc/external/mit/MesaLib/dist/src/compiler/spirv/spirv_to_nir.c Wed May 8 12:54:51 2024
@@ -3095,7 +3095,8 @@ vtn_handle_texture(struct vtn_builder *b
unsigned result_size = glsl_get_vector_elements(ret_type->type);
dest->elems[0]->def = nir_channel(&b->nb, &instr->dest.ssa, result_size);
dest->elems[1]->def = nir_channels(&b->nb, &instr->dest.ssa,
- BITFIELD_MASK(result_size));
+ (nir_component_mask_t)
+ BITFIELD_MASK(result_size));
vtn_push_ssa_value(b, w[2], dest);
} else {
vtn_push_nir_ssa(b, w[2], &instr->dest.ssa);
@@ -3514,7 +3515,8 @@ vtn_handle_image(struct vtn_builder *b,
if (intrin->dest.ssa.bit_size != 32)
dest->elems[0]->def = nir_u2u32(&b->nb, dest->elems[0]->def);
dest->elems[1]->def = nir_channels(&b->nb, result,
- BITFIELD_MASK(res_type_size));
+ (nir_component_mask_t)
+ BITFIELD_MASK(res_type_size));
vtn_push_ssa_value(b, w[2], dest);
} else {
vtn_push_nir_ssa(b, w[2], result);