shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompiling

This commit is contained in:
ReinUsesLisp
2018-12-22 01:20:57 -03:00
parent 2d9136cec6
commit 03e088a4f4
3 changed files with 71 additions and 59 deletions

View File

@ -265,6 +265,7 @@ struct MetaHalfArithmetic {
struct MetaTexture {
const Sampler& sampler;
u32 coords_count{};
std::optional<u32> array_index;
};
struct MetaComponents {
@ -696,7 +697,8 @@ private:
Node GetTextureCode(Tegra::Shader::Instruction instr, Tegra::Shader::TextureType texture_type,
Tegra::Shader::TextureProcessMode process_mode, bool depth_compare,
bool is_array, std::size_t bias_offset, std::vector<Node>&& coords);
bool is_array, std::size_t array_offset, std::size_t bias_offset,
std::vector<Node>&& coords);
void WriteLogicOperation(BasicBlock& bb, Tegra::Shader::Register dest,
Tegra::Shader::LogicOperation logic_op, Node op_a, Node op_b,