diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-25 06:37:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-25 06:37:42 +0200 |
commit | bae3799bd5208d08bb52546ad0723103c94cada3 (patch) | |
tree | e4c921df6bf28cdeb50f48d1b7aa4d7a0bc002ed /src/video_core/command_processor.cpp | |
parent | Merge pull request #2683 from bunnei/telemetry-framework (diff) | |
parent | gl_rasterizer: implement procedural texture (diff) | |
download | yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.gz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.bz2 yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.lz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.xz yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.tar.zst yuzu-bae3799bd5208d08bb52546ad0723103c94cada3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/command_processor.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 8d3f76bde..4633a1df1 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -556,6 +556,37 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) { break; } + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[0], 0xb0): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[1], 0xb1): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[2], 0xb2): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[3], 0xb3): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[4], 0xb4): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[5], 0xb5): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[6], 0xb6): + case PICA_REG_INDEX_WORKAROUND(texturing.proctex_lut_data[7], 0xb7): { + auto& index = regs.texturing.proctex_lut_config.index; + auto& pt = g_state.proctex; + + switch (regs.texturing.proctex_lut_config.ref_table.Value()) { + case TexturingRegs::ProcTexLutTable::Noise: + pt.noise_table[index % pt.noise_table.size()].raw = value; + break; + case TexturingRegs::ProcTexLutTable::ColorMap: + pt.color_map_table[index % pt.color_map_table.size()].raw = value; + break; + case TexturingRegs::ProcTexLutTable::AlphaMap: + pt.alpha_map_table[index % pt.alpha_map_table.size()].raw = value; + break; + case TexturingRegs::ProcTexLutTable::Color: + pt.color_table[index % pt.color_table.size()].raw = value; + break; + case TexturingRegs::ProcTexLutTable::ColorDiff: + pt.color_diff_table[index % pt.color_diff_table.size()].raw = value; + break; + } + index.Assign(index + 1); + break; + } default: break; } |