mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 07:23:24 +09:00
[Feat] (MG_Backend/DirectVulkan): wire up client-side buffer
This commit is contained in:
@@ -558,8 +558,11 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
if (programObj.globalUboBinding == static_cast<Int>(binding)) {
|
||||
outData = program.GetUBOData();
|
||||
outSize = static_cast<VkDeviceSize>(program.GetUBOSize());
|
||||
MOBILEGL_ASSERT(outData != nullptr, "ResolveUniformBufferPayload: global UBO data is null");
|
||||
MOBILEGL_ASSERT(outSize > 0, "ResolveUniformBufferPayload: global UBO size is zero");
|
||||
static const Array<Uint8, 16> emptyGlobalUbo{};
|
||||
if (outData == nullptr || outSize == 0) {
|
||||
outData = emptyGlobalUbo.data();
|
||||
outSize = static_cast<VkDeviceSize>(emptyGlobalUbo.size());
|
||||
}
|
||||
return outData != nullptr && outSize > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user