mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Store the register type for reservations as a char.
Essentially because the meaning of 'b' differs between SM1-3 and SM4+. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
abd6ceb489
commit
bb79ca76ae
@ -212,7 +212,7 @@ struct hlsl_src
|
||||
|
||||
struct hlsl_reg_reservation
|
||||
{
|
||||
enum vkd3d_shader_register_type type;
|
||||
char type;
|
||||
DWORD regnum;
|
||||
};
|
||||
|
||||
|
@ -782,29 +782,9 @@ static bool add_func_parameter(struct hlsl_ctx *ctx, struct list *list,
|
||||
|
||||
static struct hlsl_reg_reservation *parse_reg_reservation(struct hlsl_ctx *ctx, const char *reg_string)
|
||||
{
|
||||
enum vkd3d_shader_register_type type;
|
||||
struct hlsl_reg_reservation *reg_res;
|
||||
DWORD regnum = 0;
|
||||
|
||||
switch (reg_string[0])
|
||||
{
|
||||
case 'c':
|
||||
type = VKD3DSPR_CONST;
|
||||
break;
|
||||
case 'i':
|
||||
type = VKD3DSPR_CONSTINT;
|
||||
break;
|
||||
case 'b':
|
||||
type = VKD3DSPR_CONSTBOOL;
|
||||
break;
|
||||
case 's':
|
||||
type = VKD3DSPR_SAMPLER;
|
||||
break;
|
||||
default:
|
||||
FIXME("Unsupported register type.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!sscanf(reg_string + 1, "%u", ®num))
|
||||
{
|
||||
FIXME("Unsupported register reservation syntax.\n");
|
||||
@ -813,7 +793,7 @@ static struct hlsl_reg_reservation *parse_reg_reservation(struct hlsl_ctx *ctx,
|
||||
|
||||
if (!(reg_res = hlsl_alloc(ctx, sizeof(*reg_res))))
|
||||
return NULL;
|
||||
reg_res->type = type;
|
||||
reg_res->type = reg_string[0];
|
||||
reg_res->regnum = regnum;
|
||||
return reg_res;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user