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
855bb71f
Commit
855bb71f
authored
2 years ago
by
Elizabeth Figura
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_nequal().
parent
d565caaf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!205
hlsl: Return hlsl_ir_node pointers from instruction constructors, part 5.
Pipeline
#10700
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/vkd3d-shader/hlsl_constant_ops.c
+8
-8
8 additions, 8 deletions
libs/vkd3d-shader/hlsl_constant_ops.c
with
8 additions
and
8 deletions
libs/vkd3d-shader/hlsl_constant_ops.c
+
8
−
8
View file @
855bb71f
...
...
@@ -257,12 +257,12 @@ static bool fold_mul(struct hlsl_ctx *ctx, struct hlsl_constant_value *dst, cons
return
true
;
}
static
bool
fold_nequal
(
struct
hlsl_ctx
*
ctx
,
struct
hlsl_
ir_
constant
*
dst
,
struct
hlsl_ir_constant
*
src1
,
struct
hlsl_ir_constant
*
src2
)
static
bool
fold_nequal
(
struct
hlsl_ctx
*
ctx
,
struct
hlsl_constant
_value
*
dst
,
const
struct
hlsl_type
*
dst_type
,
const
struct
hlsl_ir_constant
*
src1
,
const
struct
hlsl_ir_constant
*
src2
)
{
unsigned
int
k
;
assert
(
dst
->
node
.
data
_type
->
base_type
==
HLSL_TYPE_BOOL
);
assert
(
dst_type
->
base_type
==
HLSL_TYPE_BOOL
);
assert
(
src1
->
node
.
data_type
->
base_type
==
src2
->
node
.
data_type
->
base_type
);
for
(
k
=
0
;
k
<
4
;
++
k
)
...
...
@@ -271,24 +271,24 @@ static bool fold_nequal(struct hlsl_ctx *ctx, struct hlsl_ir_constant *dst,
{
case
HLSL_TYPE_FLOAT
:
case
HLSL_TYPE_HALF
:
dst
->
value
.
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
f
!=
src2
->
value
.
u
[
k
].
f
;
dst
->
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
f
!=
src2
->
value
.
u
[
k
].
f
;
break
;
case
HLSL_TYPE_DOUBLE
:
dst
->
value
.
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
d
!=
src2
->
value
.
u
[
k
].
d
;
dst
->
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
d
!=
src2
->
value
.
u
[
k
].
d
;
break
;
case
HLSL_TYPE_INT
:
case
HLSL_TYPE_UINT
:
case
HLSL_TYPE_BOOL
:
dst
->
value
.
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
u
!=
src2
->
value
.
u
[
k
].
u
;
dst
->
u
[
k
].
u
=
src1
->
value
.
u
[
k
].
u
!=
src2
->
value
.
u
[
k
].
u
;
break
;
default:
vkd3d_unreachable
();
}
dst
->
value
.
u
[
k
].
u
*=
~
0u
;
dst
->
u
[
k
].
u
*=
~
0u
;
}
return
true
;
}
...
...
@@ -596,7 +596,7 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
break
;
case
HLSL_OP2_NEQUAL
:
success
=
fold_nequal
(
ctx
,
res
,
arg1
,
arg2
);
success
=
fold_nequal
(
ctx
,
&
res
->
value
,
instr
->
data_type
,
arg1
,
arg2
);
break
;
case
HLSL_OP2_DIV
:
...
...
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