summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-07-15 22:28:27 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-07-15 22:38:25 +0200
commit6b0d017675ea5e4779e43b68df0aa2a9f781039f (patch)
tree1f23b67003b851232d816824e0597f7861dd93ab /src/video_core
parentgl_shader_cache: Address review commentaries (diff)
downloadyuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar.gz
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar.bz2
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar.lz
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar.xz
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.tar.zst
yuzu-6b0d017675ea5e4779e43b68df0aa2a9f781039f.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 6236c5cdd..50b616be4 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -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());