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
4de04eba
There was an error fetching the commit references. Please try again later.
Commit
4de04eba
authored
5 years ago
by
ReinUsesLisp
Browse files
Options
Downloads
Patches
Plain Diff
shader_ir: Implement LD_S
Loads from shared memory.
parent
f17415d4
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/memory.cpp
+13
-10
13 additions, 10 deletions
src/video_core/shader/decode/memory.cpp
with
13 additions
and
10 deletions
src/video_core/shader/decode/memory.cpp
+
13
−
10
View file @
4de04eba
...
...
@@ -106,16 +106,17 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
}
break
;
}
case
OpCode
::
Id
::
LD_L
:
{
LOG_DEBUG
(
HW_GPU
,
"LD_L cache management mode: {}"
,
static_cast
<
u64
>
(
instr
.
ld_l
.
unknown
.
Value
()))
;
const
auto
Get
Lmem
=
[
&
](
s32
offset
)
{
case
OpCode
::
Id
::
LD_L
:
LOG_DEBUG
(
HW_GPU
,
"LD_L cache management mode: {}"
,
static_cast
<
u64
>
(
instr
.
ld_l
.
unknown
));
[[
fallthrough
]]
;
case
OpCode
::
Id
::
LD_S
:
{
const
auto
Get
Memory
=
[
&
](
s32
offset
)
{
ASSERT
(
offset
%
4
==
0
);
const
Node
immediate_offset
=
Immediate
(
static_cast
<
s32
>
(
instr
.
smem_imm
)
+
offset
);
const
Node
address
=
Operation
(
OperationCode
::
IAdd
,
NO_PRECISE
,
GetRegister
(
instr
.
gpr8
),
immediate_offset
);
return
GetLocalMemory
(
address
);
return
opcode
->
get
().
GetId
()
==
OpCode
::
Id
::
LD_S
?
GetSharedMemory
(
address
)
:
GetLocalMemory
(
address
);
};
switch
(
instr
.
ldst_sl
.
type
.
Value
())
{
...
...
@@ -135,14 +136,16 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) {
return
0
;
}
}();
for
(
u32
i
=
0
;
i
<
count
;
++
i
)
SetTemporary
(
bb
,
i
,
GetLmem
(
i
*
4
));
for
(
u32
i
=
0
;
i
<
count
;
++
i
)
for
(
u32
i
=
0
;
i
<
count
;
++
i
)
{
SetTemporary
(
bb
,
i
,
GetMemory
(
i
*
4
));
}
for
(
u32
i
=
0
;
i
<
count
;
++
i
)
{
SetRegister
(
bb
,
instr
.
gpr0
.
Value
()
+
i
,
GetTemporary
(
i
));
}
break
;
}
default
:
UNIMPLEMENTED_MSG
(
"
LD_L
Unhandled type: {}"
,
UNIMPLEMENTED_MSG
(
"
{}
Unhandled type: {}"
,
opcode
->
get
().
GetName
(),
static_cast
<
u32
>
(
instr
.
ldst_sl
.
type
.
Value
()));
}
break
;
...
...
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