mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Fix swizzle for scalars.
In rare cases, OpCompositeExtract was generated for scalars. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
a6bf217af8
commit
7466758f08
@@ -2661,6 +2661,9 @@ static uint32_t vkd3d_dxbc_compiler_emit_swizzle_ext(struct vkd3d_dxbc_compiler
|
|||||||
|
|
||||||
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
|
type_id = vkd3d_spirv_get_type_id(builder, component_type, component_count);
|
||||||
|
|
||||||
|
if (component_count == 1 && val_component_count == 1)
|
||||||
|
return val_id;
|
||||||
|
|
||||||
if (component_count == 1)
|
if (component_count == 1)
|
||||||
{
|
{
|
||||||
component_idx = vkd3d_write_mask_get_component_idx(write_mask);
|
component_idx = vkd3d_write_mask_get_component_idx(write_mask);
|
||||||
|
Reference in New Issue
Block a user