2025-09-03 13:08:37 -04:00
|
|
|
#include "xgfxvertexshaderloaddef.h"
|
|
|
|
|
|
|
|
|
|
XGfxVertexShaderLoadDef::XGfxVertexShaderLoadDef()
|
|
|
|
|
: XAsset()
|
|
|
|
|
, mCachedPart()
|
|
|
|
|
, mPhysicalPart()
|
|
|
|
|
, mCachedPartSize(0)
|
|
|
|
|
, mPhysicalPartSize(0)
|
|
|
|
|
{
|
2025-09-10 21:58:26 -04:00
|
|
|
SetName("GFX Vertex Shader Load Definition");
|
2025-09-03 13:08:37 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
XGfxVertexShaderLoadDef::~XGfxVertexShaderLoadDef()
|
2025-09-03 13:08:37 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
void XGfxVertexShaderLoadDef::Clear()
|
|
|
|
|
{
|
|
|
|
|
mCachedPart = QByteArray();
|
|
|
|
|
mPhysicalPart = QByteArray();
|
|
|
|
|
mCachedPartSize = 0;
|
|
|
|
|
mPhysicalPartSize = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 21:58:26 -04:00
|
|
|
void XGfxVertexShaderLoadDef::ParseData(XDataStream *aStream)
|
2025-09-03 13:08:37 -04:00
|
|
|
{
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1] Parsing data for %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(GetName());
|
|
|
|
|
}
|
2025-09-05 18:35:17 -04:00
|
|
|
qint32 cachedPartPtr, physicalPartPtr;
|
|
|
|
|
*aStream
|
|
|
|
|
>> cachedPartPtr
|
|
|
|
|
>> physicalPartPtr
|
|
|
|
|
>> mCachedPartSize
|
|
|
|
|
>> mPhysicalPartSize;
|
2025-09-03 13:08:37 -04:00
|
|
|
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1] cachedPartPtr = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(cachedPartPtr);
|
|
|
|
|
qDebug() << QString("[%1] physicalPartPtr = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(physicalPartPtr);
|
|
|
|
|
qDebug() << QString("[%1] mCachedPartSize = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mCachedPartSize);
|
|
|
|
|
qDebug() << QString("[%1] mPerPrimArgCount %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mPhysicalPartSize);
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
if (physicalPartPtr)
|
|
|
|
|
{
|
|
|
|
|
aStream->readRawData(mPhysicalPart.data(), mPhysicalPartSize);
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1] mPhysicalPart = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mPhysicalPart);
|
|
|
|
|
}
|
2025-09-05 18:35:17 -04:00
|
|
|
}
|
|
|
|
|
if (cachedPartPtr)
|
|
|
|
|
{
|
|
|
|
|
aStream->readRawData(mCachedPart.data(), mCachedPartSize);
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1] mCachedPart = %2").arg(aStream->device()->pos(), 10, 10, QChar('0')).arg(mCachedPart);
|
|
|
|
|
}
|
2025-09-05 18:35:17 -04:00
|
|
|
}
|
2025-09-03 13:08:37 -04:00
|
|
|
}
|