Code cleanup
Fixes some C++2X deprecation warnings
This commit is contained in:
parent
878dbc2987
commit
f735a89518
2 changed files with 5 additions and 6 deletions
|
|
@ -334,8 +334,7 @@ void VulkanExampleBase::renderLoop()
|
||||||
if (wl_display_dispatch_pending(display) == -1)
|
if (wl_display_dispatch_pending(display) == -1)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
benchmark.run([=, this] { render(); }, vulkanDevice->properties);
|
||||||
benchmark.run([=] { render(); }, vulkanDevice->properties);
|
|
||||||
vkDeviceWaitIdle(device);
|
vkDeviceWaitIdle(device);
|
||||||
if (!benchmark.filename.empty()) {
|
if (!benchmark.filename.empty()) {
|
||||||
benchmark.saveResults();
|
benchmark.saveResults();
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Vulkan Example - Multi threaded command buffer generation and rendering
|
* Vulkan Example - Multi threaded command buffer generation and rendering
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de
|
* Copyright (C) 2016-2025 by Sascha Willems - www.saschawillems.de
|
||||||
*
|
*
|
||||||
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
|
||||||
*/
|
*/
|
||||||
|
|
@ -329,7 +329,7 @@ public:
|
||||||
|
|
||||||
VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo();
|
VkCommandBufferBeginInfo cmdBufInfo = vks::initializers::commandBufferBeginInfo();
|
||||||
|
|
||||||
VkClearValue clearValues[2];
|
VkClearValue clearValues[2]{};
|
||||||
clearValues[0].color = defaultClearColor;
|
clearValues[0].color = defaultClearColor;
|
||||||
clearValues[1].depthStencil = { 1.0f, 0 };
|
clearValues[1].depthStencil = { 1.0f, 0 };
|
||||||
|
|
||||||
|
|
@ -369,7 +369,7 @@ public:
|
||||||
{
|
{
|
||||||
for (uint32_t i = 0; i < numObjectsPerThread; i++)
|
for (uint32_t i = 0; i < numObjectsPerThread; i++)
|
||||||
{
|
{
|
||||||
threadPool.threads[t]->addJob([=] { threadRenderCode(t, i, inheritanceInfo); });
|
threadPool.threads[t]->addJob([=, this] { threadRenderCode(t, i, inheritanceInfo); });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -428,7 +428,7 @@ public:
|
||||||
VkPipelineMultisampleStateCreateInfo multisampleState = vks::initializers::pipelineMultisampleStateCreateInfo(VK_SAMPLE_COUNT_1_BIT, 0);
|
VkPipelineMultisampleStateCreateInfo multisampleState = vks::initializers::pipelineMultisampleStateCreateInfo(VK_SAMPLE_COUNT_1_BIT, 0);
|
||||||
std::vector<VkDynamicState> dynamicStateEnables = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
|
std::vector<VkDynamicState> dynamicStateEnables = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
|
||||||
VkPipelineDynamicStateCreateInfo dynamicState = vks::initializers::pipelineDynamicStateCreateInfo(dynamicStateEnables);
|
VkPipelineDynamicStateCreateInfo dynamicState = vks::initializers::pipelineDynamicStateCreateInfo(dynamicStateEnables);
|
||||||
std::array<VkPipelineShaderStageCreateInfo, 2> shaderStages;
|
std::array<VkPipelineShaderStageCreateInfo, 2> shaderStages{};
|
||||||
|
|
||||||
VkGraphicsPipelineCreateInfo pipelineCI = vks::initializers::pipelineCreateInfo(pipelineLayout, renderPass, 0);
|
VkGraphicsPipelineCreateInfo pipelineCI = vks::initializers::pipelineCreateInfo(pipelineLayout, renderPass, 0);
|
||||||
pipelineCI.pInputAssemblyState = &inputAssemblyState;
|
pipelineCI.pInputAssemblyState = &inputAssemblyState;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue