mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Chore] (MG_Backend/DirectGLES, MG_Impl/Texture): more logging
This commit is contained in:
@@ -376,9 +376,9 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
auto* pData = (levelDirty && levelByteSize != 0)
|
auto* pData = (levelDirty && levelByteSize != 0)
|
||||||
? textureMipmapObject->MapMipmapData(uploadTarget, level)
|
? textureMipmapObject->MapMipmapData(uploadTarget, level)
|
||||||
: nullptr;
|
: nullptr;
|
||||||
MGLOG_D("%s: target: %s: syncing mip %d: %dx%dx%d, byteSize = %d, pData = %p", __func__,
|
MGLOG_D("%s: target: %s: syncing mip %d: %dx%dx%d, byteSize = %d, pData = %p, levelDirty = %s", __func__,
|
||||||
MG_Util::ConvertTextureUploadTargetToString(uploadTarget).c_str(), level,
|
MG_Util::ConvertTextureUploadTargetToString(uploadTarget).c_str(), level,
|
||||||
levelTexelSize.x(), levelTexelSize.y(), levelTexelSize.z(), levelByteSize, pData);
|
levelTexelSize.x(), levelTexelSize.y(), levelTexelSize.z(), levelByteSize, pData, levelDirty ? "true" : "false");
|
||||||
|
|
||||||
errorLopper.Clear();
|
errorLopper.Clear();
|
||||||
MG_External::GLES::glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
|
MG_External::GLES::glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
|
||||||
|
|||||||
@@ -709,8 +709,11 @@ namespace MobileGL {
|
|||||||
"Texture object here should always be an object with mipmap");
|
"Texture object here should always be an object with mipmap");
|
||||||
auto textureMipmapObject = static_cast<MG_State::GLState::TextureObjectMipmap*>(textureObject.get());
|
auto textureMipmapObject = static_cast<MG_State::GLState::TextureObjectMipmap*>(textureObject.get());
|
||||||
|
|
||||||
|
MGLOG_D("%s: Allocating %d bytes at mip %d", __func__, internalBytes, level);
|
||||||
|
|
||||||
// Allocate in TextureObject
|
// Allocate in TextureObject
|
||||||
textureMipmapObject->AllocateStorage(textureUploadingTarget, level, {{width, height, 1}, internalBytes});
|
textureMipmapObject->AllocateStorage(textureUploadingTarget, level, {{width, height, 1}, internalBytes});
|
||||||
|
textureMipmapObject->MarkStorageDirty(textureUploadingTarget, level, true);
|
||||||
|
|
||||||
if (!originalPixels) {
|
if (!originalPixels) {
|
||||||
MGLOG_D("%s: No input pixel and no PBO bound, no pixel transfer", __func__);
|
MGLOG_D("%s: No input pixel and no PBO bound, no pixel transfer", __func__);
|
||||||
@@ -734,8 +737,6 @@ namespace MobileGL {
|
|||||||
textureMipmapObject->UpdateMipmapSubData(textureUploadingTarget, level, texelInput);
|
textureMipmapObject->UpdateMipmapSubData(textureUploadingTarget, level, texelInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
textureMipmapObject->MarkStorageDirty(textureUploadingTarget, level, true);
|
|
||||||
|
|
||||||
free(processedPixels);
|
free(processedPixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user