mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/spirv: Support 64-bit source value for bitfield instructions.
This commit is contained in:
parent
3bbe374ca8
commit
92f0b37133
Notes:
Alexandre Julliard
2024-01-29 22:51:22 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/587
@ -7472,7 +7472,7 @@ static void spirv_compiler_emit_bitfield_instruction(struct spirv_compiler *comp
|
|||||||
const struct vkd3d_shader_dst_param *dst = instruction->dst;
|
const struct vkd3d_shader_dst_param *dst = instruction->dst;
|
||||||
const struct vkd3d_shader_src_param *src = instruction->src;
|
const struct vkd3d_shader_src_param *src = instruction->src;
|
||||||
enum vkd3d_shader_component_type component_type;
|
enum vkd3d_shader_component_type component_type;
|
||||||
unsigned int i, j, k, src_count;
|
unsigned int i, j, k, src_count, size;
|
||||||
uint32_t write_mask;
|
uint32_t write_mask;
|
||||||
SpvOp op;
|
SpvOp op;
|
||||||
|
|
||||||
@ -7481,8 +7481,9 @@ static void spirv_compiler_emit_bitfield_instruction(struct spirv_compiler *comp
|
|||||||
|
|
||||||
component_type = vkd3d_component_type_from_data_type(dst->reg.data_type);
|
component_type = vkd3d_component_type_from_data_type(dst->reg.data_type);
|
||||||
type_id = vkd3d_spirv_get_type_id(builder, component_type, 1);
|
type_id = vkd3d_spirv_get_type_id(builder, component_type, 1);
|
||||||
mask_id = spirv_compiler_get_constant_uint(compiler, 0x1f);
|
size = (src[src_count - 1].reg.data_type == VKD3D_DATA_UINT64) ? 0x40 : 0x20;
|
||||||
size_id = spirv_compiler_get_constant_uint(compiler, 0x20);
|
mask_id = spirv_compiler_get_constant_uint(compiler, size - 1);
|
||||||
|
size_id = spirv_compiler_get_constant_uint(compiler, size);
|
||||||
|
|
||||||
switch (instruction->handler_idx)
|
switch (instruction->handler_idx)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user