Implement quick shader switch hotkeys
This commit is contained in:
@@ -388,7 +388,7 @@ void PipelineLayout::create() {
|
||||
|
||||
std::unique_lock l(layoutLock);
|
||||
if (cachedLayouts.contains(layoutHash)) {
|
||||
std::cout << "New Layout" << std::endl;
|
||||
// std::cout << "New Layout" << std::endl;
|
||||
layoutHandle = cachedLayouts[layoutHash];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ void Fence::reset()
|
||||
{
|
||||
if (signaled)
|
||||
{
|
||||
vkResetFences(graphics->getDevice(), 1, &fence);
|
||||
VK_CHECK(vkResetFences(graphics->getDevice(), 1, &fence));
|
||||
//std::cout << vkGetFenceStatus(graphics->getDevice(), fence) << std::endl;
|
||||
signaled = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ void Window::pollInput()
|
||||
|
||||
void Window::beginFrame()
|
||||
{
|
||||
imageAvailableFences[currentSemaphoreIndex]->wait(100000);
|
||||
imageAvailableFences[currentSemaphoreIndex]->wait(100000000);
|
||||
imageAvailableFences[currentSemaphoreIndex]->reset();
|
||||
vkAcquireNextImageKHR(graphics->getDevice(), swapchain, std::numeric_limits<uint64>::max(), imageAvailableSemaphores[currentSemaphoreIndex]->getHandle(), imageAvailableFences[currentSemaphoreIndex]->getHandle(), ¤tImageIndex);
|
||||
graphics->getGraphicsCommands()->getCommands()->waitForSemaphore(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, imageAvailableSemaphores[currentSemaphoreIndex]);
|
||||
@@ -284,14 +284,14 @@ void Window::chooseSwapSurfaceFormat()
|
||||
|
||||
void Window::chooseSwapPresentMode()
|
||||
{
|
||||
/*for (const auto& supportedPresentMode : supportedPresentModes)
|
||||
for (const auto& supportedPresentMode : supportedPresentModes)
|
||||
{
|
||||
if (supportedPresentMode == VK_PRESENT_MODE_MAILBOX_KHR)
|
||||
{
|
||||
presentMode = supportedPresentMode;
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
presentMode = VK_PRESENT_MODE_FIFO_KHR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user