mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Handle snorm/unorm types as resource formats.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
6fd1a1ce7e
commit
fb2b974466
Notes:
Henri Verbeet
2024-10-22 20:53:53 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1189
@@ -3430,13 +3430,19 @@ static D3D_SHADER_INPUT_TYPE sm4_resource_type(const struct hlsl_type *type)
|
||||
|
||||
static enum vkd3d_sm4_data_type sm4_data_type(const struct hlsl_type *type)
|
||||
{
|
||||
switch (type->e.resource.format->e.numeric.type)
|
||||
const struct hlsl_type *format = type->e.resource.format;
|
||||
|
||||
switch (format->e.numeric.type)
|
||||
{
|
||||
case HLSL_TYPE_DOUBLE:
|
||||
return VKD3D_SM4_DATA_DOUBLE;
|
||||
|
||||
case HLSL_TYPE_FLOAT:
|
||||
case HLSL_TYPE_HALF:
|
||||
if (format->modifiers & HLSL_MODIFIER_UNORM)
|
||||
return VKD3D_SM4_DATA_UNORM;
|
||||
if (format->modifiers & HLSL_MODIFIER_SNORM)
|
||||
return VKD3D_SM4_DATA_SNORM;
|
||||
return VKD3D_SM4_DATA_FLOAT;
|
||||
|
||||
case HLSL_TYPE_INT:
|
||||
|
Reference in New Issue
Block a user