mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
command_processor: Add an assertion to ensure LUTs are not written past their boundaries.
This commit is contained in:
parent
310a1c30ca
commit
d171822dce
@ -474,6 +474,9 @@ static void WritePicaReg(u32 id, u32 value, u32 mask) {
|
|||||||
case PICA_REG_INDEX_WORKAROUND(lighting.lut_data[7], 0x1cf):
|
case PICA_REG_INDEX_WORKAROUND(lighting.lut_data[7], 0x1cf):
|
||||||
{
|
{
|
||||||
auto& lut_config = regs.lighting.lut_config;
|
auto& lut_config = regs.lighting.lut_config;
|
||||||
|
|
||||||
|
ASSERT_MSG(lut_config.index < 256, "lut_config.index exceeded maximum value of 255!");
|
||||||
|
|
||||||
g_state.lighting.luts[lut_config.type][lut_config.index].raw = value;
|
g_state.lighting.luts[lut_config.type][lut_config.index].raw = value;
|
||||||
lut_config.index = lut_config.index + 1;
|
lut_config.index = lut_config.index + 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user