Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Merge branch 'master' into tlds

raven0295c7741d4663
diff --cc src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 7a5321b9ce,b3e95187ed..00cd05e62a
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@@ -1987,18 -2018,20 +2018,25 @@@ private
break;
}
case OpCode::Id::TLDS: {
- ASSERT(instr.tlds.GetTextureType() == Tegra::Shader::TextureType::Texture2D);
- ASSERT(instr.tlds.IsArrayTexture() == false);
std::string coord;
-
+ const Tegra::Shader::TextureType texture_type{instr.tlds.GetTextureType()};
+ const bool is_array{instr.tlds.IsArrayTexture()};
++
+ ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::NODEP),
+ "NODEP is not implemented");
+ ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::AOFFI),
+ "AOFFI is not implemented");
+ ASSERT_MSG(!instr.tlds.UsesMiscMode(Tegra::Shader::TextureMiscMode::MZ),
+ "MZ is not implemented");
- switch (instr.tlds.GetTextureType()) {
+ switch (texture_type) {
+ case Tegra::Shader::TextureType::Texture1D: {
+ const std::string x = regs.GetRegisterAsInteger(instr.gpr8);
+ coord = "int coords = " + x + ';';
+ break;
+ }
case Tegra::Shader::TextureType::Texture2D: {
- if (instr.tlds.IsArrayTexture()) {
+ if (is_array) {
LOG_CRITICAL(HW_GPU, "Unhandled 2d array texture");
UNREACHABLE();
} else {