vkd3d-shader/hlsl: Parse texture types.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-10-07 21:58:53 -05:00
committed by Alexandre Julliard
parent 64bd7f677c
commit fcb03a9947
3 changed files with 40 additions and 2 deletions

View File

@@ -2451,6 +2451,26 @@ type:
{
$$ = ctx->builtin_types.sampler[HLSL_SAMPLER_DIM_3D];
}
| KW_TEXTURE
{
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_GENERIC);
}
| KW_TEXTURE1D
{
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_1D);
}
| KW_TEXTURE2D
{
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_2D);
}
| KW_TEXTURE3D
{
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_3D);
}
| KW_TEXTURECUBE
{
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_CUBE);
}
| TYPE_IDENTIFIER
{
$$ = hlsl_get_type(ctx->cur_scope, $1, true);