mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/spirv: Support VKD3D_DATA_UINT in spirv_compiler_emit_neg().
The DXIL parser uses unsigned types even if the source code uses signed, so unsigned values may be negated.
This commit is contained in:
parent
4905d047bd
commit
3e0638148a
Notes:
Alexandre Julliard
2023-11-06 23:18:07 +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/409
@ -3865,7 +3865,7 @@ static uint32_t spirv_compiler_emit_neg(struct spirv_compiler *compiler,
|
||||
type_id = spirv_compiler_get_type_id_for_reg(compiler, reg, write_mask);
|
||||
if (reg->data_type == VKD3D_DATA_FLOAT || reg->data_type == VKD3D_DATA_DOUBLE)
|
||||
return vkd3d_spirv_build_op_fnegate(builder, type_id, val_id);
|
||||
else if (reg->data_type == VKD3D_DATA_INT)
|
||||
else if (reg->data_type == VKD3D_DATA_INT || reg->data_type == VKD3D_DATA_UINT)
|
||||
return vkd3d_spirv_build_op_snegate(builder, type_id, val_id);
|
||||
|
||||
FIXME("Unhandled data type %#x.\n", reg->data_type);
|
||||
|
Loading…
Reference in New Issue
Block a user