gl_shader_decompiler: Implement TextureCube for TEX.

This commit is contained in:
bunnei 2018-08-20 21:53:00 -04:00
parent ea99819f37
commit 948002635f

View file

@ -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<u32>(instr.tex.texture_type.Value()));