From 948002635f86aac18e5fbafb5b0bb4315cd3569d Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 20 Aug 2018 21:53:00 -0400 Subject: [PATCH] gl_shader_decompiler: Implement TextureCube for TEX. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index b7b3fbc17f..9e0813a727 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -1525,6 +1525,14 @@ private: coord = "vec3 coords = vec3(" + x + ", " + y + ", " + z + ");"; break; } + case Tegra::Shader::TextureType::TextureCube: { + std::string x = regs.GetRegisterAsFloat(instr.gpr8); + std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1); + std::string z = regs.GetRegisterAsFloat(instr.gpr8.Value() + 2); + ASSERT(instr.gpr20.Value() == Register::ZeroIndex); + coord = "vec3 coords = vec3(" + x + ", " + y + ", " + z + ");"; + break; + } default: LOG_CRITICAL(HW_GPU, "Unhandled texture type {}", static_cast(instr.tex.texture_type.Value()));