Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wine
vkd3d
Merge requests
!193
vkd3d-shader/hlsl: Add support for writing RWStructuredBuffer declarations.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
vkd3d-shader/hlsl: Add support for writing RWStructuredBuffer declarations.
nsivov/vkd3d:uav_types2
into
master
Overview
37
Commits
9
Pipelines
1
Changes
1
Merged
Nikolay Sivov
requested to merge
nsivov/vkd3d:uav_types2
into
master
1 year ago
Overview
37
Commits
9
Pipelines
1
Changes
1
Expand
Signed-off-by: Nikolay Sivov
nsivov@codeweavers.com
Merge request reports
Viewing commit
5b36b6a2
Show latest version
1 file
+
40
−
8
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
5b36b6a2
vkd3d-shader/hlsl: Improve UAV format type checking for buffer types.
· 5b36b6a2
Nikolay Sivov
authored
1 year ago
libs/vkd3d-shader/hlsl.y
+
40
−
8
Options
@@ -5104,16 +5104,48 @@ type_no_void:
}
| uav_type '<' type '>'
{
if ($3->class > HLSL_CLASS_VECTOR)
{
struct vkd3d_string_buffer *string;
struct vkd3d_string_buffer *string = hlsl_type_to_string(ctx, $3);
string = hlsl_type_to_string(ctx, $3);
if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"UAV data type %s is not scalar or vector.", string->buffer);
hlsl_release_string_buffer(ctx, string);
switch ($1)
{
case HLSL_SAMPLER_DIM_BUFFER:
if ($3->class > HLSL_CLASS_MATRIX)
{
if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"UAV data type %s is not scalar, vector, or matrix.", string->buffer);
}
else if ($3->reg_size[HLSL_REGSET_NUMERIC] > 4)
{
if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"UAV data type %s size exceeds 4-component register size.", string->buffer);
}
break;
case HLSL_SAMPLER_DIM_STRUCTURED_BUFFER:
if ($3->class > HLSL_CLASS_STRUCT)
{
if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"UAV data type %s can't be used with structured buffers.", string->buffer);
}
break;
case HLSL_SAMPLER_DIM_1D:
case HLSL_SAMPLER_DIM_2D:
case HLSL_SAMPLER_DIM_3D:
if ($3->class > HLSL_CLASS_VECTOR)
{
if (string)
hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"UAV data type %s is not scalar or vector.", string->buffer);
}
break;
default:
vkd3d_unreachable();
}
hlsl_release_string_buffer(ctx, string);
$$ = hlsl_new_uav_type(ctx, $1, $3);
}
| TYPE_IDENTIFIER
Loading