From 8d9d20d47b3a851412d53f151095f08c87afb82d Mon Sep 17 00:00:00 2001 From: Isabella Bosia Date: Sat, 26 Sep 2020 01:05:36 +0100 Subject: [PATCH] vkd3d-shader: Add valid vkd3d_sm4_data_type types. Signed-off-by: Isabella Bosia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/dxbc.c | 30 +++++++++++++++--------- libs/vkd3d-shader/trace.c | 22 ++++++++++------- libs/vkd3d-shader/vkd3d_shader_private.h | 4 ++++ 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index 398cd9fb..371ea133 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -433,11 +433,15 @@ enum vkd3d_sm4_resource_type enum vkd3d_sm4_data_type { - VKD3D_SM4_DATA_UNORM = 0x1, - VKD3D_SM4_DATA_SNORM = 0x2, - VKD3D_SM4_DATA_INT = 0x3, - VKD3D_SM4_DATA_UINT = 0x4, - VKD3D_SM4_DATA_FLOAT = 0x5, + VKD3D_SM4_DATA_UNORM = 0x1, + VKD3D_SM4_DATA_SNORM = 0x2, + VKD3D_SM4_DATA_INT = 0x3, + VKD3D_SM4_DATA_UINT = 0x4, + VKD3D_SM4_DATA_FLOAT = 0x5, + VKD3D_SM4_DATA_MIXED = 0x6, + VKD3D_SM4_DATA_DOUBLE = 0x7, + VKD3D_SM4_DATA_CONTINUED = 0x8, + VKD3D_SM4_DATA_UNUSED = 0x9, }; enum vkd3d_sm4_sampler_mode @@ -522,12 +526,16 @@ static const enum vkd3d_shader_resource_type resource_type_table[] = static const enum vkd3d_data_type data_type_table[] = { - /* 0 */ VKD3D_DATA_FLOAT, - /* VKD3D_SM4_DATA_UNORM */ VKD3D_DATA_UNORM, - /* VKD3D_SM4_DATA_SNORM */ VKD3D_DATA_SNORM, - /* VKD3D_SM4_DATA_INT */ VKD3D_DATA_INT, - /* VKD3D_SM4_DATA_UINT */ VKD3D_DATA_UINT, - /* VKD3D_SM4_DATA_FLOAT */ VKD3D_DATA_FLOAT, + /* 0 */ VKD3D_DATA_FLOAT, + /* VKD3D_SM4_DATA_UNORM */ VKD3D_DATA_UNORM, + /* VKD3D_SM4_DATA_SNORM */ VKD3D_DATA_SNORM, + /* VKD3D_SM4_DATA_INT */ VKD3D_DATA_INT, + /* VKD3D_SM4_DATA_UINT */ VKD3D_DATA_UINT, + /* VKD3D_SM4_DATA_FLOAT */ VKD3D_DATA_FLOAT, + /* VKD3D_SM4_DATA_MIXED */ VKD3D_DATA_MIXED, + /* VKD3D_SM4_DATA_DOUBLE */ VKD3D_DATA_DOUBLE, + /* VKD3D_SM4_DATA_CONTINUED */ VKD3D_DATA_CONTINUED, + /* VKD3D_SM4_DATA_UNUSED */ VKD3D_DATA_UNUSED, }; static bool shader_is_sm_5_1(const struct vkd3d_sm4_data *priv) diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 2d758b65..6049ee13 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -530,15 +530,19 @@ static void shader_dump_data_type(struct vkd3d_string_buffer *buffer, enum vkd3d { static const char *const data_type_names[] = { - /* VKD3D_DATA_FLOAT */ "float", - /* VKD3D_DATA_INT */ "int", - /* VKD3D_DATA_RESOURCE */ "resource", - /* VKD3D_DATA_SAMPLER */ "sampler", - /* VKD3D_DATA_UAV */ "uav", - /* VKD3D_DATA_UINT */ "uint", - /* VKD3D_DATA_UNORM */ "unorm", - /* VKD3D_DATA_SNORM */ "snorm", - /* VKD3D_DATA_OPAQUE */ "opaque", + /* VKD3D_DATA_FLOAT */ "float", + /* VKD3D_DATA_INT */ "int", + /* VKD3D_DATA_RESOURCE */ "resource", + /* VKD3D_DATA_SAMPLER */ "sampler", + /* VKD3D_DATA_UAV */ "uav", + /* VKD3D_DATA_UINT */ "uint", + /* VKD3D_DATA_UNORM */ "unorm", + /* VKD3D_DATA_SNORM */ "snorm", + /* VKD3D_DATA_OPAQUE */ "opaque", + /* VKD3D_DATA_MIXED */ "mixed", + /* VKD3D_DATA_DOUBLE */ "double", + /* VKD3D_DATA_CONTINUED */ "", + /* VKD3D_DATA_UNUSED */ "", }; const char *name; diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index ec0014e3..71eb80d8 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -394,6 +394,10 @@ enum vkd3d_data_type VKD3D_DATA_UNORM, VKD3D_DATA_SNORM, VKD3D_DATA_OPAQUE, + VKD3D_DATA_MIXED, + VKD3D_DATA_DOUBLE, + VKD3D_DATA_CONTINUED, + VKD3D_DATA_UNUSED, }; enum vkd3d_immconst_type