Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
vkd3d
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Francisco Casas
vkd3d
Commits
75ab9d31
Commit
75ab9d31
authored
3 years ago
by
Elizabeth Figura
Committed by
Alexandre Julliard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/hlsl: Store the matrix majority as a type modifiers bitmask.
parent
b3c62095
No related branches found
Branches containing commit
Tags
wine-0.9.54
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
libs/vkd3d-shader/hlsl.c
+1
-1
1 addition, 1 deletion
libs/vkd3d-shader/hlsl.c
libs/vkd3d-shader/hlsl.h
+1
-7
1 addition, 7 deletions
libs/vkd3d-shader/hlsl.h
libs/vkd3d-shader/hlsl.l
+2
-2
2 additions, 2 deletions
libs/vkd3d-shader/hlsl.l
libs/vkd3d-shader/hlsl.y
+1
-4
1 addition, 4 deletions
libs/vkd3d-shader/hlsl.y
with
5 additions
and
14 deletions
libs/vkd3d-shader/hlsl.c
+
1
−
1
View file @
75ab9d31
...
...
@@ -2973,7 +2973,7 @@ static bool hlsl_ctx_init(struct hlsl_ctx *ctx, const char *source_name,
ctx
->
location
.
line
=
ctx
->
location
.
column
=
1
;
vkd3d_string_buffer_cache_init
(
&
ctx
->
string_buffers
);
ctx
->
matrix_majority
=
HLSL_COLUMN_MAJOR
;
ctx
->
matrix_majority
=
HLSL_
MODIFIER_
COLUMN_MAJOR
;
list_init
(
&
ctx
->
scopes
);
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d-shader/hlsl.h
+
1
−
7
View file @
75ab9d31
...
...
@@ -116,12 +116,6 @@ enum hlsl_sampler_dim
HLSL_SAMPLER_DIM_MAX
=
HLSL_SAMPLER_DIM_CUBEARRAY
,
};
enum
hlsl_matrix_majority
{
HLSL_COLUMN_MAJOR
,
HLSL_ROW_MAJOR
};
enum
hlsl_regset
{
HLSL_REGSET_SAMPLERS
,
...
...
@@ -735,7 +729,7 @@ struct hlsl_ctx
const
struct
hlsl_ir_function_decl
*
cur_function
;
/* Default matrix majority for matrix types. Can be set by a pragma within the HLSL source. */
enum
hlsl_matrix_majority
matrix_majority
;
unsigned
int
matrix_majority
;
/* Basic data types stored for convenience. */
struct
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d-shader/hlsl.l
+
2
−
2
View file @
75ab9d31
...
...
@@ -233,14 +233,14 @@ row_major {return KW_ROW_MAJOR; }
struct hlsl_ctx *ctx = yyget_extra(yyscanner);
TRACE("#pragma setting row_major mode.\n");
ctx->matrix_majority = HLSL_ROW_MAJOR;
ctx->matrix_majority = HLSL_
MODIFIER_
ROW_MAJOR;
BEGIN(pp_ignore);
}
<pp_pragma>pack_matrix{WS}*\({WS}*column_major{WS}*\) {
struct hlsl_ctx *ctx = yyget_extra(yyscanner);
TRACE("#pragma setting column_major mode.\n");
ctx->matrix_majority = HLSL_COLUMN_MAJOR;
ctx->matrix_majority = HLSL_
MODIFIER_
COLUMN_MAJOR;
BEGIN(pp_ignore);
}
<pp_pragma>{NEWLINE} {
...
...
This diff is collapsed.
Click to expand it.
libs/vkd3d-shader/hlsl.y
+
1
−
4
View file @
75ab9d31
...
...
@@ -886,10 +886,7 @@ static struct hlsl_type *apply_type_modifiers(struct hlsl_ctx *ctx, struct hlsl_
&& !(type->modifiers & HLSL_MODIFIERS_MAJORITY_MASK)
&& type->type == HLSL_CLASS_MATRIX)
{
if (ctx->matrix_majority == HLSL_COLUMN_MAJOR)
default_majority = HLSL_MODIFIER_COLUMN_MAJOR;
else
default_majority = HLSL_MODIFIER_ROW_MAJOR;
default_majority = ctx->matrix_majority;
}
else if (type->type != HLSL_CLASS_MATRIX)
{
...
...
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