Implement 3 coordinate array in TEXS instruction

master
FernandoS27 2018-11-05 14:07:08 +07:00
parent 81ff9e2473
commit ad2f47b579
1 changed files with 6 additions and 6 deletions

@ -2742,12 +2742,12 @@ private:
}
case 3: {
if (is_array) {
UNIMPLEMENTED_MSG("3-coordinate arrays not fully implemented");
const std::string x = regs.GetRegisterAsFloat(instr.gpr8);
const std::string y = regs.GetRegisterAsFloat(instr.gpr20);
coord = "vec2 coords = vec2(" + x + ", " + y + ");";
texture_type = Tegra::Shader::TextureType::Texture2D;
is_array = false;
const std::string index = regs.GetRegisterAsInteger(instr.gpr8);
const std::string x = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);
const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 2);
const std::string z = regs.GetRegisterAsFloat(instr.gpr20);
coord =
"vec4 coords = vec4(" + x + ", " + y + ", " + z + ", " + index + ");";
} else {
const std::string x = regs.GetRegisterAsFloat(instr.gpr8);
const std::string y = regs.GetRegisterAsFloat(instr.gpr8.Value() + 1);