mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Add enum for minimum-precision data types.
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:
parent
c6685f9fd2
commit
faeb03c1a3
@ -571,6 +571,15 @@ enum vkd3d_sysval_semantic
|
||||
VKD3D_FORCE_32_BIT_ENUM(VKD3D_SYSVAL_SEMANTIC),
|
||||
};
|
||||
|
||||
enum vkd3d_shader_minimum_precision
|
||||
{
|
||||
VKD3D_SHADER_MINIMUM_PRECISION_NONE = 0,
|
||||
VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_16 = 1,
|
||||
VKD3D_SHADER_MINIMUM_PRECISION_FLOAT_8_2 = 2,
|
||||
VKD3D_SHADER_MINIMUM_PRECISION_INT_16 = 4,
|
||||
VKD3D_SHADER_MINIMUM_PRECISION_UINT_16 = 5,
|
||||
};
|
||||
|
||||
struct vkd3d_shader_signature_element
|
||||
{
|
||||
const char *semantic_name;
|
||||
@ -580,7 +589,7 @@ struct vkd3d_shader_signature_element
|
||||
enum vkd3d_component_type component_type;
|
||||
unsigned int register_index;
|
||||
unsigned int mask;
|
||||
unsigned int min_precision;
|
||||
enum vkd3d_shader_minimum_precision min_precision;
|
||||
};
|
||||
|
||||
struct vkd3d_shader_signature
|
||||
|
@ -1992,11 +1992,11 @@ static int parse_dxbc(const char *data, size_t data_size,
|
||||
static int shader_parse_signature(DWORD tag, const char *data, DWORD data_size,
|
||||
struct vkd3d_shader_signature *s)
|
||||
{
|
||||
bool has_stream_index, has_min_precision;
|
||||
struct vkd3d_shader_signature_element *e;
|
||||
const char *ptr = data;
|
||||
unsigned int i;
|
||||
DWORD count;
|
||||
bool has_stream_index, has_min_precision;
|
||||
|
||||
if (!require_space(0, 2, sizeof(DWORD), data_size))
|
||||
{
|
||||
@ -2032,6 +2032,7 @@ static int shader_parse_signature(DWORD tag, const char *data, DWORD data_size,
|
||||
read_dword(&ptr, &e[i].stream_index);
|
||||
else
|
||||
e[i].stream_index = 0;
|
||||
|
||||
read_dword(&ptr, &name_offset);
|
||||
if (!(e[i].semantic_name = shader_get_string(data, data_size, name_offset)))
|
||||
{
|
||||
@ -2048,7 +2049,7 @@ static int shader_parse_signature(DWORD tag, const char *data, DWORD data_size,
|
||||
if (has_min_precision)
|
||||
read_dword(&ptr, &e[i].min_precision);
|
||||
else
|
||||
e[i].min_precision = 0;
|
||||
e[i].min_precision = VKD3D_SHADER_MINIMUM_PRECISION_NONE;
|
||||
|
||||
TRACE("Stream: %u, semantic: %s, semantic idx: %u, sysval_semantic %#x, "
|
||||
"type %u, register idx: %u, use_mask %#x, input_mask %#x, precision %u.\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user