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
6b0d0176
There was an error fetching the commit references. Please try again later.
Commit
6b0d0176
authored
6 years ago
by
ReinUsesLisp
Browse files
Options
Downloads
Patches
Plain Diff
gl_shader_decompiler: Stub local memory size
parent
56bca83b
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/renderer_opengl/gl_shader_decompiler.cpp
+14
-8
14 additions, 8 deletions
src/video_core/renderer_opengl/gl_shader_decompiler.cpp
with
14 additions
and
8 deletions
src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+
14
−
8
View file @
6b0d0176
...
...
@@ -344,14 +344,16 @@ private:
}
void
DeclareLocalMemory
()
{
if
(
stage
==
ProgramType
::
Compute
)
{
// TODO(Rodrigo): Unstub kernel local memory size and pass it from a register at
// specialization time.
const
u64
local_memory_size
=
stage
==
ProgramType
::
Compute
?
0x400
:
header
.
GetLocalMemorySize
();
if
(
local_memory_size
==
0
)
{
return
;
}
if
(
const
u64
local_memory_size
=
header
.
GetLocalMemorySize
();
local_memory_size
>
0
)
{
const
auto
element_count
=
Common
::
AlignUp
(
local_memory_size
,
4
)
/
4
;
code
.
AddLine
(
"float {}[{}];"
,
GetLocalMemory
(),
element_count
);
code
.
AddNewLine
();
}
const
auto
element_count
=
Common
::
AlignUp
(
local_memory_size
,
4
)
/
4
;
code
.
AddLine
(
"float {}[{}];"
,
GetLocalMemory
(),
element_count
);
code
.
AddNewLine
();
}
void
DeclareInternalFlags
()
{
...
...
@@ -703,7 +705,9 @@ private:
}
if
(
const
auto
lmem
=
std
::
get_if
<
LmemNode
>
(
&*
node
))
{
UNIMPLEMENTED_IF
(
stage
==
ProgramType
::
Compute
);
if
(
stage
==
ProgramType
::
Compute
)
{
LOG_WARNING
(
Render_OpenGL
,
"Local memory is stubbed on compute shaders"
);
}
return
fmt
::
format
(
"{}[ftou({}) / 4]"
,
GetLocalMemory
(),
Visit
(
lmem
->
GetAddress
()));
}
...
...
@@ -1080,7 +1084,9 @@ private:
target
=
result
->
first
;
is_integer
=
result
->
second
;
}
else
if
(
const
auto
lmem
=
std
::
get_if
<
LmemNode
>
(
&*
dest
))
{
UNIMPLEMENTED_IF
(
stage
==
ProgramType
::
Compute
);
if
(
stage
==
ProgramType
::
Compute
)
{
LOG_WARNING
(
Render_OpenGL
,
"Local memory is stubbed on compute shaders"
);
}
target
=
fmt
::
format
(
"{}[ftou({}) / 4]"
,
GetLocalMemory
(),
Visit
(
lmem
->
GetAddress
()));
}
else
if
(
const
auto
gmem
=
std
::
get_if
<
GmemNode
>
(
&*
dest
))
{
const
std
::
string
real
=
Visit
(
gmem
->
GetRealAddress
());
...
...
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