Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
abdbafbc
There was an error fetching the commit references. Please try again later.
Commit
abdbafbc
authored
6 years ago
by
ReinUsesLisp
Browse files
Options
Downloads
Patches
Plain Diff
shader_decode: Implement PSETP
parent
802c23b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/video_core/shader/decode/predicate_set_predicate.cpp
+21
-1
21 additions, 1 deletion
src/video_core/shader/decode/predicate_set_predicate.cpp
with
21 additions
and
1 deletion
src/video_core/shader/decode/predicate_set_predicate.cpp
+
21
−
1
View file @
abdbafbc
...
...
@@ -11,12 +11,32 @@ namespace VideoCommon::Shader {
using
Tegra
::
Shader
::
Instruction
;
using
Tegra
::
Shader
::
OpCode
;
using
Tegra
::
Shader
::
Pred
;
u32
ShaderIR
::
DecodePredicateSetPredicate
(
BasicBlock
&
bb
,
u32
pc
)
{
const
Instruction
instr
=
{
program_code
[
pc
]};
const
auto
opcode
=
OpCode
::
Decode
(
instr
);
UNIMPLEMENTED
();
const
Node
op_a
=
GetPredicate
(
instr
.
psetp
.
pred12
,
instr
.
psetp
.
neg_pred12
!=
0
);
const
Node
op_b
=
GetPredicate
(
instr
.
psetp
.
pred29
,
instr
.
psetp
.
neg_pred29
!=
0
);
// We can't use the constant predicate as destination.
ASSERT
(
instr
.
psetp
.
pred3
!=
static_cast
<
u64
>
(
Pred
::
UnusedIndex
));
const
Node
second_pred
=
GetPredicate
(
instr
.
psetp
.
pred39
,
instr
.
psetp
.
neg_pred39
!=
0
);
const
OperationCode
combiner
=
GetPredicateCombiner
(
instr
.
psetp
.
op
);
const
Node
predicate
=
Operation
(
combiner
,
op_a
,
op_b
);
// Set the primary predicate to the result of Predicate OP SecondPredicate
SetPredicate
(
bb
,
instr
.
psetp
.
pred3
,
Operation
(
combiner
,
predicate
,
second_pred
));
if
(
instr
.
psetp
.
pred0
!=
static_cast
<
u64
>
(
Pred
::
UnusedIndex
))
{
// Set the secondary predicate to the result of !Predicate OP SecondPredicate, if enabled
SetPredicate
(
bb
,
instr
.
psetp
.
pred0
,
Operation
(
combiner
,
Operation
(
OperationCode
::
LogicalNegate
,
predicate
),
second_pred
));
}
return
pc
;
}
...
...
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