mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
spirv: Only copy needed components for OpSpecConstantOp
Reviewed-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
parent
96bb9c9277
commit
a54e397152
1 changed files with 6 additions and 1 deletions
|
|
@ -1940,8 +1940,13 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode,
|
||||||
if (!nir_alu_type_get_type_size(nir_op_infos[op].input_types[i]))
|
if (!nir_alu_type_get_type_size(nir_op_infos[op].input_types[i]))
|
||||||
bit_size = glsl_get_bit_size(src_val->type->type);
|
bit_size = glsl_get_bit_size(src_val->type->type);
|
||||||
|
|
||||||
|
unsigned src_comps = nir_op_infos[op].input_sizes[i] ?
|
||||||
|
nir_op_infos[op].input_sizes[i] :
|
||||||
|
num_components;
|
||||||
|
|
||||||
unsigned j = swap ? 1 - i : i;
|
unsigned j = swap ? 1 - i : i;
|
||||||
memcpy(src[j], src_val->constant->values[0], sizeof(src[j]));
|
for (unsigned c = 0; c < src_comps; c++)
|
||||||
|
src[j][c] = src_val->constant->values[0][c];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fix up fixed size sources */
|
/* fix up fixed size sources */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue