mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-11 08:39:48 +12:00
Less UB
This commit is contained in:
parent
79c3cf2661
commit
519fb35c5f
1 changed files with 2 additions and 1 deletions
|
@ -781,7 +781,8 @@ void ShaderEmitter::recLOOP(const PICAShader& shader, u32 instruction) {
|
|||
loopLevel++;
|
||||
|
||||
// Offset of the uniform
|
||||
const uintptr_t uniformOffset = uintptr_t(&shader.intUniforms[uniformIndex]) - uintptr_t(&shader);
|
||||
const auto& uniform = shader.intUniforms[uniformIndex];
|
||||
const uintptr_t uniformOffset = uintptr_t(&uniform[0]) - uintptr_t(&shader);
|
||||
// Offset of the loop register
|
||||
const uintptr_t loopRegOffset = uintptr_t(&shader.loopCounter) - uintptr_t(&shader);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue