Add a couple of new samples, improved some others: (#414)
new: - InstanceVersion: print out the instance version - PhysicalDeviceExtensions: print out the device specific extensions - PhysicalDeviceFeatures: print out the device specific features - PhysicalDeviceGroups: print out the device groups (interesting with SLI) - PhysicalDeviceMemoryProperties: print out the device specific memory properties - PhysicalDeviceQueueFamilyProperties: print out the device specific queue family properties - SurfaceCapabilities: print out the surface specific capabilities - SurfaceFormats: print out the supported surface specific formats improved: - InstanceExtensionProperties: print out the instance extensions alphabetically - InstanceLayerProperties: removed an unused local function - RayTracing: improved fence usage
This commit is contained in:
committed by
Markus Tavenrath
parent
178bf4ded7
commit
c06a3300f6
@@ -974,12 +974,14 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
uniformBufferData.upload(device, uniformBufferObject);
|
||||
|
||||
// frame begin
|
||||
while (vk::Result::eTimeout == device->waitForFences(*perFrameData[frameIndex].fence, VK_TRUE, vk::su::FenceTimeout))
|
||||
;
|
||||
vk::ResultValue<uint32_t> rv = device->acquireNextImageKHR(*swapChainData.swapChain, UINT64_MAX, *perFrameData[frameIndex].presentCompleteSemaphore, nullptr);
|
||||
assert(rv.result == vk::Result::eSuccess);
|
||||
uint32_t backBufferIndex = rv.value;
|
||||
|
||||
while (vk::Result::eTimeout == device->waitForFences(*perFrameData[frameIndex].fence, VK_TRUE, vk::su::FenceTimeout))
|
||||
;
|
||||
device->resetFences(*perFrameData[frameIndex].fence);
|
||||
|
||||
commandBuffer->begin(vk::CommandBufferBeginInfo(vk::CommandBufferUsageFlagBits::eOneTimeSubmit));
|
||||
|
||||
if (appInfo.useRasterRender)
|
||||
@@ -1027,12 +1029,9 @@ int main(int /*argc*/, char** /*argv*/)
|
||||
|
||||
// frame end
|
||||
commandBuffer->end();
|
||||
device->resetFences(*perFrameData[frameIndex].fence);
|
||||
const vk::PipelineStageFlags waitDstStageMask = vk::PipelineStageFlagBits::eColorAttachmentOutput;
|
||||
graphicsQueue.submit(vk::SubmitInfo(1, &(*perFrameData[frameIndex].presentCompleteSemaphore), &waitDstStageMask, 1, &(*commandBuffer), 1,
|
||||
&(*perFrameData[frameIndex].renderCompleteSemaphore)), *perFrameData[frameIndex].fence);
|
||||
while (vk::Result::eTimeout == device->waitForFences(*perFrameData[frameIndex].fence, VK_TRUE, vk::su::FenceTimeout))
|
||||
;
|
||||
presentQueue.presentKHR(vk::PresentInfoKHR(1, &(*perFrameData[frameIndex].renderCompleteSemaphore), 1, &(*swapChainData.swapChain), &backBufferIndex));
|
||||
frameIndex = (frameIndex + 1) % IMGUI_VK_QUEUED_FRAMES;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user