Add C3D_BoolUnifSet, correct int/bool uniform IDs
This commit is contained in:
parent
7c48f9106f
commit
959f250f4e
@ -21,6 +21,7 @@ static inline C3D_FVec* C3D_FVUnifWritePtr(GPU_SHADER_TYPE type, int id, int siz
|
||||
|
||||
static inline C3D_IVec* C3D_IVUnifWritePtr(GPU_SHADER_TYPE type, int id)
|
||||
{
|
||||
id -= 0x70;
|
||||
C3D_IVUnifDirty[type][id] = true;
|
||||
return &C3D_IVUnif[type][id];
|
||||
}
|
||||
@ -63,4 +64,14 @@ static inline void C3D_IVUnifSet(GPU_SHADER_TYPE type, int id, int x, int y, int
|
||||
*ptr = IVec_Pack(x, y, z, w);
|
||||
}
|
||||
|
||||
static inline void C3D_BoolUnifSet(GPU_SHADER_TYPE type, int id, bool value)
|
||||
{
|
||||
id -= 0x78;
|
||||
C3D_BoolUnifsDirty[type] = true;
|
||||
if (value)
|
||||
C3D_BoolUnifs[type] |= BIT(id);
|
||||
else
|
||||
C3D_BoolUnifs[type] &= ~BIT(id);
|
||||
}
|
||||
|
||||
void C3D_UpdateUniforms(GPU_SHADER_TYPE type);
|
||||
|
Loading…
Reference in New Issue
Block a user