mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-shader: Fix swizzling for non floating-point result values.
Avoids incorrect bitcasts.
This commit is contained in:
parent
7212a74a05
commit
cb125d0020
@ -1478,14 +1478,14 @@ static void vkd3d_dxbc_compiler_emit_store_reg(struct vkd3d_dxbc_compiler *compi
|
|||||||
if (component_count == 1)
|
if (component_count == 1)
|
||||||
return vkd3d_dxbc_compiler_emit_store_scalar(compiler, reg, write_mask, val_id);
|
return vkd3d_dxbc_compiler_emit_store_scalar(compiler, reg, write_mask, val_id);
|
||||||
|
|
||||||
|
reg_id = vkd3d_dxbc_compiler_get_register_id(compiler, reg);
|
||||||
|
|
||||||
if (component_count != VKD3D_VEC4_SIZE)
|
if (component_count != VKD3D_VEC4_SIZE)
|
||||||
{
|
{
|
||||||
uint32_t type_id, reg_val_id;
|
uint32_t type_id, reg_val_id;
|
||||||
|
|
||||||
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_TYPE_FLOAT, VKD3D_VEC4_SIZE);
|
type_id = vkd3d_spirv_get_type_id(builder, VKD3D_TYPE_FLOAT, VKD3D_VEC4_SIZE);
|
||||||
|
reg_val_id = vkd3d_spirv_build_op_load(builder, type_id, reg_id, SpvMemoryAccessMaskNone);
|
||||||
reg_val_id = vkd3d_dxbc_compiler_emit_load_reg(compiler,
|
|
||||||
reg, VKD3DSP_NOSWIZZLE, VKD3DSP_WRITEMASK_ALL);
|
|
||||||
|
|
||||||
for (i = 0, component_idx = 0; i < ARRAY_SIZE(components); ++i)
|
for (i = 0, component_idx = 0; i < ARRAY_SIZE(components); ++i)
|
||||||
{
|
{
|
||||||
@ -1499,7 +1499,6 @@ static void vkd3d_dxbc_compiler_emit_store_reg(struct vkd3d_dxbc_compiler *compi
|
|||||||
type_id, reg_val_id, val_id, components, ARRAY_SIZE(components));
|
type_id, reg_val_id, val_id, components, ARRAY_SIZE(components));
|
||||||
}
|
}
|
||||||
|
|
||||||
reg_id = vkd3d_dxbc_compiler_get_register_id(compiler, reg);
|
|
||||||
vkd3d_spirv_build_op_store(builder, reg_id, val_id, SpvMemoryAccessMaskNone);
|
vkd3d_spirv_build_op_store(builder, reg_id, val_id, SpvMemoryAccessMaskNone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user