Suppressing debug text rendering until debug font texture has been streamed to the GPU. Fixes Vulkan validation errors on MacOS.
Fix Vulkan validation error on macOS when clearing with the black frame pass render pass during initialization.
This commit is contained in:
@@ -781,6 +781,7 @@ void KRCamera::renderDebug(VkCommandBuffer& commandBuffer, KRSurface& surface)
|
|||||||
|
|
||||||
KRTexture* fontTexture = m_pContext->getTextureManager()->getTexture("font");
|
KRTexture* fontTexture = m_pContext->getTextureManager()->getTexture("font");
|
||||||
fontTexture->resetPoolExpiry(0.0f, KRTexture::TEXTURE_USAGE_UI);
|
fontTexture->resetPoolExpiry(0.0f, KRTexture::TEXTURE_USAGE_UI);
|
||||||
|
if (fontTexture->getStreamLevel(KRTexture::TEXTURE_USAGE_UI) != kraken_stream_level::STREAM_LEVEL_OUT) {
|
||||||
|
|
||||||
PipelineInfo info{};
|
PipelineInfo info{};
|
||||||
std::string shader_name("debug_font");
|
std::string shader_name("debug_font");
|
||||||
@@ -798,6 +799,7 @@ void KRCamera::renderDebug(VkCommandBuffer& commandBuffer, KRSurface& surface)
|
|||||||
m_debug_text_vbo_data.bind(commandBuffer);
|
m_debug_text_vbo_data.bind(commandBuffer);
|
||||||
|
|
||||||
vkCmdDraw(commandBuffer, vertex_count, 1, 0, 0);
|
vkCmdDraw(commandBuffer, vertex_count, 1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
debugPass.end(commandBuffer);
|
debugPass.end(commandBuffer);
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ KrResult KRSurface::createSwapChain()
|
|||||||
|
|
||||||
info.clearColor = true;
|
info.clearColor = true;
|
||||||
info.keepColor = true;
|
info.keepColor = true;
|
||||||
info.clearDepth = false;
|
info.clearDepth = true;
|
||||||
info.keepDepth = false;
|
info.keepDepth = false;
|
||||||
info.finalPass = true;
|
info.finalPass = true;
|
||||||
m_blackFramePass->create(*device, selectedSurfaceFormat.format, depthImageFormat, info);
|
m_blackFramePass->create(*device, selectedSurfaceFormat.format, depthImageFormat, info);
|
||||||
|
|||||||
Reference in New Issue
Block a user