Add samples ImmutableSampler, InitTexture, InputAttachment (#315)

+ slightly adjust some other samples.
This commit is contained in:
Andreas Süßenbach
2019-04-09 15:19:18 +02:00
committed by Markus Tavenrath
parent d4ddb0a2cd
commit d965a74cc0
18 changed files with 800 additions and 212 deletions

View File

@@ -17,16 +17,11 @@ cmake_minimum_required(VERSION 3.2)
project(Events)
set(HEADERS
../utils/geometries.hpp
../utils/math.hpp
../utils/shaders.hpp
../utils/utils.hpp
)
set(SOURCES
Events.cpp
../utils/math.cpp
../utils/shaders.cpp
../utils/utils.cpp
)

View File

@@ -15,9 +15,6 @@
// VulkanHpp Samples : Events
// Use basic events
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"
#include "SPIRV/GlslangToSpv.h"
@@ -84,7 +81,7 @@ int main(int /*argc*/, char ** /*argv*/)
device->resetFences(fence.get());
// Note that stepping through this code in the debugger is a bad idea because the GPU can TDR waiting for the event.
// Execute the code from vkQueueSubmit through vkSetEvent without breakpoints
// Execute the code from vk::Queue::submit() through vk::Device::setEvent() without breakpoints
waitDestinationStageMask = vk::PipelineStageFlagBits::eBottomOfPipe;
graphicsQueue.submit(submitInfo, fence.get());
@@ -92,7 +89,7 @@ int main(int /*argc*/, char ** /*argv*/)
result = device->waitForFences(fence.get(), true, vk::su::FenceTimeout);
if (result != vk::Result::eTimeout)
{
std::cout << "Didn't get expected timeout in vkWaitForFences, exiting\n";
std::cout << "Didn't get expected timeout in vk::Device::waitForFences, exiting\n";
exit(-1);
}
@@ -114,7 +111,7 @@ int main(int /*argc*/, char ** /*argv*/)
commandBuffers[0]->setEvent(event.get(), vk::PipelineStageFlagBits::eBottomOfPipe);
commandBuffers[0]->end();
// Look for the event on the CPU. It should be RESET since we haven't sent the command buffer yet.
// Look for the event on the CPU. It should be vk::Result::eEventReset since we haven't sent the command buffer yet.
result = device->getEventStatus(event.get());
assert(result == vk::Result::eEventReset);