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
Commits
54bd6f7b
Commit
54bd6f7b
authored
2 years ago
by
Elizabeth Figura
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/hlsl: Return a hlsl_block from the "declaration_statement" rule.
parent
77e1c589
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!275
hlsl: Replace bare list pointers with hlsl_block, part 4.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d-shader/hlsl.y
+10
-13
10 additions, 13 deletions
libs/vkd3d-shader/hlsl.y
with
10 additions
and
13 deletions
libs/vkd3d-shader/hlsl.y
+
10
−
13
View file @
54bd6f7b
...
...
@@ -172,12 +172,6 @@ static struct list *make_empty_list(struct hlsl_ctx *ctx)
return list;
}
static void destroy_instr_list(struct list *list)
{
hlsl_free_instr_list(list);
vkd3d_free(list);
}
static void destroy_block(struct hlsl_block *block)
{
hlsl_block_cleanup(block);
...
...
@@ -4558,7 +4552,6 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type
%token <intval> PRE_LINE
%type <list> declaration
%type <list> declaration_statement
%type <list> struct_declaration_without_vars
%type <list> type_specs
%type <list> variables_def
...
...
@@ -4585,6 +4578,7 @@ static void validate_texture_format_type(struct hlsl_ctx *ctx, struct hlsl_type
%type <block> bitxor_expr
%type <block> compound_statement
%type <block> conditional_expr
%type <block> declaration_statement
%type <block> equality_expr
%type <block> expr
%type <block> expr_optional
...
...
@@ -4661,9 +4655,9 @@ hlsl_prog:
| hlsl_prog buffer_declaration buffer_body
| hlsl_prog declaration_statement
{
if (!list_empty($2))
if (!list_empty(
&
$2
->instrs
))
hlsl_fixme(ctx, &@2, "Uniform initializer.");
destroy_
instr_list
($2);
destroy_
block
($2);
}
| hlsl_prog preproc_directive
| hlsl_prog ';'
...
...
@@ -5512,10 +5506,16 @@ type:
declaration_statement:
declaration
{
$$ = list_to_block($1);
}
| struct_declaration_without_vars
{
$$ = list_to_block($1);
}
| typedef
{
if (!($$ = make_empty_
list
(ctx)))
if (!($$ = make_empty_
block
(ctx)))
YYABORT;
}
...
...
@@ -5912,9 +5912,6 @@ statement_list:
statement:
declaration_statement
{
$$ = list_to_block($1);
}
| expr_statement
| compound_statement
| jump_statement
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment