trying to make it work without -rdynamic
This commit is contained in:
@@ -58,6 +58,7 @@ CVkImage::CVkImage( uint32_t nWidth, uint32_t nHeight, uint32_t nDepth, EImageFo
|
||||
m_eMultisampleType = eMultisampleType;
|
||||
m_eImageType = eImageType;
|
||||
m_eFormat = eFormat;
|
||||
m_ePreferredLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
||||
CreateImage(nWidth, nHeight, eFormat, eMultisampleType, eUsage);
|
||||
CreateImageView();
|
||||
}
|
||||
@@ -124,7 +125,7 @@ void CVkImage::CreateImage( uint32_t nWidth, uint32_t nHeight, EImageFormat eFor
|
||||
stCreateInfo.extent.depth = 1;
|
||||
stCreateInfo.mipLevels = 1;
|
||||
stCreateInfo.arrayLayers = 1;
|
||||
stCreateInfo.usage = eUsage;
|
||||
stCreateInfo.usage = eUsage | VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
|
||||
stCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
stCreateInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
stCreateInfo.format = GetImageFormat(eFormat);
|
||||
@@ -613,18 +614,34 @@ void CVkRenderContext::Init()
|
||||
g_pCommandBufferManager->Init();
|
||||
|
||||
|
||||
CVkEmptyCommand *pPresentCommand = (CVkEmptyCommand*)g_pCommandBufferManager->CreateCommand("Empty");
|
||||
pPresentCommand->AddSwapchainDependency( (IRenderingObject**)g_vkSwapchainImages.GetData(), DEPENDENCY_MODE_IMAGE_PRESENT );
|
||||
|
||||
|
||||
s_pPresentCommandBuffer = g_pCommandBufferManager->CreateCommandBuffer();
|
||||
s_pPresentCommandBuffer->Reset();
|
||||
s_pPresentCommandBuffer->AddCommand(pPresentCommand);
|
||||
s_pPresentCommandBuffer->Render();
|
||||
}
|
||||
|
||||
void CVkRenderContext::Frame( float fDeltaTime )
|
||||
{
|
||||
CVkBlitCommand *pBlitCommand = NULL;
|
||||
if (m_pOutputImage)
|
||||
{
|
||||
pBlitCommand = CREATE_COMMAND(Blit);
|
||||
pBlitCommand->AddDependency(m_pOutputImage, DEPENDENCY_MODE_BLIT_IMAGE_SOURCE);
|
||||
pBlitCommand->AddSwapchainDependency((IRenderingObject**)g_vkSwapchainImages.GetData(), DEPENDENCY_MODE_BLIT_IMAGE_DESTINATION);
|
||||
pBlitCommand->stInputImage.m_eObjectType = FRAME_OBJECT_TYPE_SINGLE;
|
||||
pBlitCommand->stInputImage.m_pSingle = m_pOutputImage;
|
||||
pBlitCommand->stOutputImage.m_eObjectType = FRAME_OBJECT_TYPE_SWAPPED;
|
||||
pBlitCommand->stOutputImage.m_ppSwapped = (IRenderingObject**)g_vkSwapchainImages.GetData();
|
||||
pBlitCommand->iSrcMax[0] = 1280;
|
||||
pBlitCommand->iSrcMax[1] = 720;
|
||||
pBlitCommand->iSrcMax[2] = 1;
|
||||
pBlitCommand->iDstMax[0] = 1280;
|
||||
pBlitCommand->iDstMax[1] = 720;
|
||||
pBlitCommand->iDstMax[2] = 1;
|
||||
}
|
||||
s_pPresentCommandBuffer = g_pCommandBufferManager->CreateCommandBuffer();
|
||||
s_pPresentCommandBuffer->Reset();
|
||||
if (pBlitCommand != NULL)
|
||||
s_pPresentCommandBuffer->AddCommand(pBlitCommand);
|
||||
s_pPresentCommandBuffer->Render();
|
||||
|
||||
vkDeviceWaitIdle(g_vkDevice);
|
||||
m_bOutputImageOutdated = false;
|
||||
|
||||
@@ -752,6 +769,9 @@ formatPicked:
|
||||
pImage->m_eImageType = IMAGE_TYPE_2D;
|
||||
pImage->m_eMultisampleType = MULTISAMPLE_TYPE_NONE;
|
||||
pImage->m_eFormat = IMAGE_FORMAT_WINDOW;
|
||||
pImage->m_nHeight = 1280;
|
||||
pImage->m_nWidth = 720;
|
||||
pImage->m_ePreferredLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
||||
pImage->CreateImageView();
|
||||
g_vkSwapchainImages[i] = pImage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user