diff options
author | Jannik Vogel <email@jannikvogel.de> | 2016-05-11 13:39:28 +0200 |
---|---|---|
committer | Jannik Vogel <email@jannikvogel.de> | 2016-06-07 00:06:28 +0200 |
commit | 57855a1701474c65b8dd95d0c312d02fae8fe1a6 (patch) | |
tree | b56fa3b4381e767aec2cba572e656e51110cd92e /src/video_core/pica_state.h | |
parent | OpenGL: Avoid undefined behaviour for UNIFORM_BLOCK_DATA_SIZE (diff) | |
download | yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar.gz yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar.bz2 yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar.lz yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar.xz yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.tar.zst yuzu-57855a1701474c65b8dd95d0c312d02fae8fe1a6.zip |
Diffstat (limited to 'src/video_core/pica_state.h')
-rw-r--r-- | src/video_core/pica_state.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/video_core/pica_state.h b/src/video_core/pica_state.h index 495174c25..01f4285a8 100644 --- a/src/video_core/pica_state.h +++ b/src/video_core/pica_state.h @@ -33,10 +33,10 @@ struct State { u32 raw; // LUT value, encoded as 12-bit fixed point, with 12 fraction bits - BitField< 0, 12, u32> value; + BitField< 0, 12, u32> value; // 0.0.12 fixed point // Used by HW for efficient interpolation, Citra does not use these - BitField<12, 12, u32> difference; + BitField<12, 12, s32> difference; // 1.0.11 fixed point float ToFloat() { return static_cast<float>(value) / 4095.f; @@ -46,6 +46,18 @@ struct State { std::array<std::array<LutEntry, 256>, 24> luts; } lighting; + struct { + union LutEntry { + // Used for raw access + u32 raw; + + BitField< 0, 13, s32> difference; // 1.1.11 fixed point + BitField<13, 11, u32> value; // 0.0.11 fixed point + }; + + std::array<LutEntry, 128> lut; + } fog; + /// Current Pica command list struct { const u32* head_ptr; |