HBL_DISCARD can be used here https://github.com/OGRECave/ogre/blob/v ... .cpp#L2007
For the objects being rendered with software vertex animation, it always becomes HBL_DISCARD in that function when I debug it.
There is no GPU>CPU transfer here (shadow buffer should be used): https://github.com/OGRECave/ogre/blob/1 ... .cpp#L1977
I don't know exactly what that means, but when I debug the srcPosLock variable, it shows: "mShadowBuffer = empty" and "mUsage = 5".
on exit from the function, you should end up here: https://github.com/OGRECave/ogre/blob/1 ... r.cpp#L223 and the whole buffer should be discarded
It calls D3D11HardwareBuffer::_updateFromShadow 3 times when the softwareVertexBlend ends, and all calls contain a non-empty mShadowBuffer.
The first call it comes into this if-case here:
Code: Select all
if(mShadowBuffer && mShadowUpdated && !mSuppressHardwareUpdate)
{
bool discardWholeBuffer = mLockStart == 0 && mLockSize == mSizeInBytes;
copyDataImpl(*mShadowBuffer, mLockStart, mLockStart, mLockSize, discardWholeBuffer);
mShadowUpdated = false;
}
The second call it does not come into a single if-case, so nothing happens in the function.
The third call it comes into this if-case here:
Code: Select all
if (mUseTempStagingBuffer)
{
// delete
mShadowBuffer.reset();
mUseTempStagingBuffer = false;
}
I also tried to replace this whole function (Mesh::softwareVertexBlend) with the one from 1.11.2, but it had no effect on the FPS at all.