[Fix] (DirectVulkan): prepare image copy recording after uploads and share texture usage checks

This commit is contained in:
2026-10-05 00:19:21 -04:00
parent 4d6904184d
commit 4fb75f4e00
2 changed files with 28 additions and 22 deletions
@@ -10678,15 +10678,6 @@ void main() {
return;
}
auto& frame = m_frameContext.GetCurrent();
if (!frame.isCommandRecording) {
m_frameContext.BeginCommandRecording();
}
if (VkRenderPassManager::GetActiveRenderPass() != nullptr) {
VkRenderPassManager::EndRenderPass(frame.commandBuffer);
}
// One resolver for both object kinds. The texture arm is the same
// SyncTextureAndGetDescriptor the copy always used; the renderbuffer arm goes through the
// render-pass manager, which is where a renderbuffer's VkImage lives.
@@ -10938,6 +10929,16 @@ void main() {
}
#endif
// Syncing either endpoint can flush and retire the current command buffer for
// a texture upload. Prepare recording only after both images and uploads are ready.
auto& frame = m_frameContext.GetCurrent();
if (!frame.isCommandRecording) {
m_frameContext.BeginCommandRecording();
}
if (VkRenderPassManager::GetActiveRenderPass() != nullptr) {
VkRenderPassManager::EndRenderPass(frame.commandBuffer);
}
const auto materializeClear = [this, &frame](const CopyImageEndpoint& endpoint) {
#if MOBILEGL_BUILD_DISAGGREGATED
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) return true;