[T3D1.1 B1] GenericConstBufferLayout::set bug? - LOGGED
by Aneroun · in Torque 3D Professional · 03/05/2010 (6:59 am) · 3 replies
I have an error in some cases when engine starts rendering terrain block.
Shader's uniform variable inLightSpotDir not assigned because of dMemcmp in GenericConstBufferLayout::set() tells there are no difference in memory, so the function return false.
inside: GenericConstBufferLayout::set() around line 89:
So, inside inline void GenericConstBuffer::internalSet the following code never called:
And at the end, mWasAssigned[] has one unassinged index and when engine calls DIP, it leads to assertUnassignedConstants error.
Shader's uniform variable inLightSpotDir not assigned because of dMemcmp in GenericConstBufferLayout::set() tells there are no difference in memory, so the function return false.
inside: GenericConstBufferLayout::set() around line 89:
... skipped
if (dMemcmp(basePointer+pd.offset, data, size) != 0)
{
dMemcpy(basePointer+pd.offset, data, size);
return true;
}
return false;So, inside inline void GenericConstBuffer::internalSet the following code never called:
... skipped
if ( mLayout->set( pd, constType, size, data, mBuffer ) )
{
#ifdef TORQUE_DEBUG
// Update the debug assignment tracking.
mWasAssigned[ pd.index ] = true;
#endif
// Keep track of the dirty range so it can be queried
// later in GenericConstBuffer::getDirtyBuffer.
mDirtyStart = getMin( pd.offset, mDirtyStart );
mDirtyEnd = getMax( pd.offset + pd.size, mDirtyEnd );
}And at the end, mWasAssigned[] has one unassinged index and when engine calls DIP, it leads to assertUnassignedConstants error.
About the author
Dedicated Logic - Empowering AfterWorld
Associate Tom Spilman
Sickhead Games
Is this in BL? Do you have a spotlight in the scene?