diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/texture.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/shader/shader_ir.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp index 0b934a069..295445498 100644 --- a/src/video_core/shader/decode/texture.cpp +++ b/src/video_core/shader/decode/texture.cpp | |||
| @@ -150,7 +150,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) { | |||
| 150 | values[element] = Operation(OperationCode::TextureGather, meta, std::move(coords_copy)); | 150 | values[element] = Operation(OperationCode::TextureGather, meta, std::move(coords_copy)); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | WriteTexsInstructionFloat(bb, instr, values); | 153 | WriteTexsInstructionFloat(bb, instr, values, true); |
| 154 | break; | 154 | break; |
| 155 | } | 155 | } |
| 156 | case OpCode::Id::TXQ_B: | 156 | case OpCode::Id::TXQ_B: |
| @@ -344,14 +344,14 @@ void ShaderIR::WriteTexInstructionFloat(NodeBlock& bb, Instruction instr, const | |||
| 344 | } | 344 | } |
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | void ShaderIR::WriteTexsInstructionFloat(NodeBlock& bb, Instruction instr, | 347 | void ShaderIR::WriteTexsInstructionFloat(NodeBlock& bb, Instruction instr, const Node4& components, |
| 348 | const Node4& components) { | 348 | bool ignore_mask) { |
| 349 | // TEXS has two destination registers and a swizzle. The first two elements in the swizzle | 349 | // TEXS has two destination registers and a swizzle. The first two elements in the swizzle |
| 350 | // go into gpr0+0 and gpr0+1, and the rest goes into gpr28+0 and gpr28+1 | 350 | // go into gpr0+0 and gpr0+1, and the rest goes into gpr28+0 and gpr28+1 |
| 351 | 351 | ||
| 352 | u32 dest_elem = 0; | 352 | u32 dest_elem = 0; |
| 353 | for (u32 component = 0; component < 4; ++component) { | 353 | for (u32 component = 0; component < 4; ++component) { |
| 354 | if (!instr.texs.IsComponentEnabled(component)) | 354 | if (!instr.texs.IsComponentEnabled(component) && !ignore_mask) |
| 355 | continue; | 355 | continue; |
| 356 | SetTemporary(bb, dest_elem++, components[component]); | 356 | SetTemporary(bb, dest_elem++, components[component]); |
| 357 | } | 357 | } |
diff --git a/src/video_core/shader/shader_ir.h b/src/video_core/shader/shader_ir.h index 91cd0a534..02ddf2a75 100644 --- a/src/video_core/shader/shader_ir.h +++ b/src/video_core/shader/shader_ir.h | |||
| @@ -322,7 +322,7 @@ private: | |||
| 322 | const Node4& components); | 322 | const Node4& components); |
| 323 | 323 | ||
| 324 | void WriteTexsInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr, | 324 | void WriteTexsInstructionFloat(NodeBlock& bb, Tegra::Shader::Instruction instr, |
| 325 | const Node4& components); | 325 | const Node4& components, bool ignore_mask = false); |
| 326 | void WriteTexsInstructionHalfFloat(NodeBlock& bb, Tegra::Shader::Instruction instr, | 326 | void WriteTexsInstructionHalfFloat(NodeBlock& bb, Tegra::Shader::Instruction instr, |
| 327 | const Node4& components); | 327 | const Node4& components); |
| 328 | 328 | ||