mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Add parser support for the ByteAddressBuffer type.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
8438aacc3b
commit
1a28e7d9c6
Notes:
Henri Verbeet
2024-11-06 23:01:27 +01:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1245
@ -2774,6 +2774,12 @@ struct vkd3d_string_buffer *hlsl_type_to_string(struct hlsl_ctx *ctx, const stru
|
||||
return string;
|
||||
|
||||
case HLSL_CLASS_TEXTURE:
|
||||
if (type->sampler_dim == HLSL_SAMPLER_DIM_RAW_BUFFER)
|
||||
{
|
||||
vkd3d_string_buffer_printf(string, "ByteAddressBuffer");
|
||||
return string;
|
||||
}
|
||||
|
||||
if (type->sampler_dim == HLSL_SAMPLER_DIM_GENERIC)
|
||||
{
|
||||
vkd3d_string_buffer_printf(string, "Texture");
|
||||
|
@ -74,6 +74,7 @@ ANY (.)
|
||||
BlendState {return KW_BLENDSTATE; }
|
||||
break {return KW_BREAK; }
|
||||
Buffer {return KW_BUFFER; }
|
||||
ByteAddressBuffer {return KW_BYTEADDRESSBUFFER; }
|
||||
case {return KW_CASE; }
|
||||
cbuffer {return KW_CBUFFER; }
|
||||
centroid {return KW_CENTROID; }
|
||||
|
@ -6509,6 +6509,7 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%token KW_BLENDSTATE
|
||||
%token KW_BREAK
|
||||
%token KW_BUFFER
|
||||
%token KW_BYTEADDRESSBUFFER
|
||||
%token KW_CASE
|
||||
%token KW_CONSTANTBUFFER
|
||||
%token KW_CBUFFER
|
||||
@ -7878,6 +7879,10 @@ type_no_void:
|
||||
|
||||
$$ = hlsl_new_texture_type(ctx, $1, $3, sample_count);
|
||||
}
|
||||
| KW_BYTEADDRESSBUFFER
|
||||
{
|
||||
$$ = hlsl_new_texture_type(ctx, HLSL_SAMPLER_DIM_RAW_BUFFER, hlsl_get_scalar_type(ctx, HLSL_TYPE_UINT), 0);
|
||||
}
|
||||
| uav_type '<' resource_format '>'
|
||||
{
|
||||
validate_uav_type(ctx, $1, $3, &@3);
|
||||
|
Loading…
Reference in New Issue
Block a user