mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/spirv: Always use a 64-bit write mask for IMMCONST64 src params.
There is no way to tell in spirv_compiler_emit_load_reg() if the write mask is 64-bit. All loads are 32-bit except for IMMCONST64 and SSA, and the latter ignores the mask, so the only issue lies with IMMCONST64.
This commit is contained in:
parent
13143700b7
commit
5082893e5d
Notes:
Alexandre Julliard
2024-03-06 23:29:32 +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/675
@ -7093,8 +7093,8 @@ static void spirv_compiler_emit_mov(struct spirv_compiler *compiler,
|
||||
struct vkd3d_shader_register_info dst_reg_info, src_reg_info;
|
||||
const struct vkd3d_shader_dst_param *dst = instruction->dst;
|
||||
const struct vkd3d_shader_src_param *src = instruction->src;
|
||||
unsigned int i, component_count, write_mask;
|
||||
uint32_t components[VKD3D_VEC4_SIZE];
|
||||
unsigned int i, component_count;
|
||||
|
||||
if (register_is_constant_or_undef(&src->reg) || src->reg.type == VKD3DSPR_SSA || dst->reg.type == VKD3DSPR_SSA
|
||||
|| dst->modifiers || src->modifiers)
|
||||
@ -7145,7 +7145,9 @@ static void spirv_compiler_emit_mov(struct spirv_compiler *compiler,
|
||||
}
|
||||
|
||||
general_implementation:
|
||||
val_id = spirv_compiler_emit_load_src(compiler, src, dst->write_mask);
|
||||
write_mask = (src->reg.type == VKD3DSPR_IMMCONST64 && !data_type_is_64_bit(dst->reg.data_type))
|
||||
? vsir_write_mask_64_from_32(dst->write_mask) : dst->write_mask;
|
||||
val_id = spirv_compiler_emit_load_src(compiler, src, write_mask);
|
||||
if (dst->reg.data_type != src->reg.data_type)
|
||||
{
|
||||
val_id = vkd3d_spirv_build_op_bitcast(builder, vkd3d_spirv_get_type_id_for_data_type(builder,
|
||||
|
@ -34,7 +34,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
todo(sm<6) draw quad
|
||||
if(sm<6) probe uav 1 (0) ri (12)
|
||||
if(sm>=6) probe uav 1 (0) rd (12.2)
|
||||
|
||||
@ -54,6 +54,6 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw quad
|
||||
draw quad
|
||||
probe uav 1 (0) ri64 (-12)
|
||||
probe uav 1 (1) rd (13.3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user