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
d4df803b
There was an error fetching the commit references. Please try again later.
Commit
d4df803b
authored
5 years ago
by
ReinUsesLisp
Browse files
Options
Downloads
Patches
Plain Diff
shader_ir/other: Implement IPA.IDX
parent
5321cdd2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/video_core/engines/shader_bytecode.h
+1
-0
1 addition, 0 deletions
src/video_core/engines/shader_bytecode.h
src/video_core/shader/decode/other.cpp
+8
-5
8 additions, 5 deletions
src/video_core/shader/decode/other.cpp
with
9 additions
and
5 deletions
src/video_core/engines/shader_bytecode.h
+
1
−
0
View file @
d4df803b
...
...
@@ -596,6 +596,7 @@ union Instruction {
}
alu
;
union
{
BitField
<
38
,
1
,
u64
>
idx
;
BitField
<
51
,
1
,
u64
>
saturate
;
BitField
<
52
,
2
,
IpaSampleMode
>
sample_mode
;
BitField
<
54
,
2
,
IpaInterpMode
>
interp_mode
;
...
...
This diff is collapsed.
Click to expand it.
src/video_core/shader/decode/other.cpp
+
8
−
5
View file @
d4df803b
...
...
@@ -130,15 +130,18 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) {
break
;
}
case
OpCode
::
Id
::
IPA
:
{
const
auto
&
attribute
=
instr
.
attribute
.
fmt28
;
const
bool
is_physical
=
instr
.
ipa
.
idx
&&
instr
.
gpr8
.
Value
()
!=
0xff
;
const
auto
attribute
=
instr
.
attribute
.
fmt28
;
const
Tegra
::
Shader
::
IpaMode
input_mode
{
instr
.
ipa
.
interp_mode
.
Value
(),
instr
.
ipa
.
sample_mode
.
Value
()};
const
Node
attr
=
GetInputAttribute
(
attribute
.
index
,
attribute
.
element
);
Node
value
=
attr
;
Node
value
=
is_physical
?
GetPhysicalInputAttribute
(
instr
.
gpr8
)
:
GetInputAttribute
(
attribute
.
index
,
attribute
.
element
)
;
const
Tegra
::
Shader
::
Attribute
::
Index
index
=
attribute
.
index
.
Value
();
if
(
index
>=
Tegra
::
Shader
::
Attribute
::
Index
::
Attribute_0
&&
index
<=
Tegra
::
Shader
::
Attribute
::
Index
::
Attribute_31
)
{
const
bool
is_generic
=
index
>=
Tegra
::
Shader
::
Attribute
::
Index
::
Attribute_0
&&
index
<=
Tegra
::
Shader
::
Attribute
::
Index
::
Attribute_31
;
if
(
is_generic
||
is_physical
)
{
// TODO(Blinkhawk): There are cases where a perspective attribute use PASS.
// In theory by setting them as perspective, OpenGL does the perspective correction.
// A way must figured to reverse the last step of it.
...
...
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