mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 21:12:25 +02:00
Debug code
This commit is contained in:
parent
2cef749183
commit
3b797f5785
1 changed files with 6 additions and 0 deletions
|
@ -47,12 +47,15 @@ struct GPUKTXPayload {
|
|||
ser << CURRENT_VERSION;
|
||||
ser << _samplerDesc;
|
||||
|
||||
qCWarning(gpulogging) << "Offsets: " << offsetof(struct GPUKTXPayload, _samplerDesc) << offsetof(struct GPUKTXPayload, _usage) << offsetof(struct GPUKTXPayload, _usageType) << offsetof(struct GPUKTXPayload, _originalSize);
|
||||
uint32 usageData = _usage._flags.to_ulong();
|
||||
ser << usageData;
|
||||
|
||||
ser << (char)_usageType;
|
||||
ser << _originalSize;
|
||||
ser.addPadding(PADDING);
|
||||
|
||||
assert(ser.length() == GPUKTXPayload::SIZE);
|
||||
}
|
||||
|
||||
bool unserialize(DataDeserializer &dsr) {
|
||||
|
@ -65,6 +68,9 @@ struct GPUKTXPayload {
|
|||
if (version > CURRENT_VERSION) {
|
||||
// If we try to load a version that we don't know how to parse,
|
||||
// it will render incorrectly
|
||||
qCWarning(gpulogging) << "KTX version" << version << "is newer than our own," << CURRENT_VERSION;
|
||||
qCWarning(gpulogging) << "Offsets: " << offsetof(struct GPUKTXPayload, _samplerDesc) << offsetof(struct GPUKTXPayload, _usage) << offsetof(struct GPUKTXPayload, _usageType) << offsetof(struct GPUKTXPayload, _originalSize);
|
||||
qCWarning(gpulogging) << dsr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue