Add samples InstanceExtensionProperties, InstanceLayerExtensionProperties, InstanceLayerProperties, MultipleSets (#320)

+ slightly adjust some other files.
This commit is contained in:
Andreas Süßenbach
2019-04-15 10:18:58 +02:00
committed by Markus Tavenrath
parent d965a74cc0
commit 1a7779e75b
32 changed files with 771 additions and 124 deletions

View File

@@ -41,5 +41,4 @@ add_executable(DrawTexturedCube
set_target_properties(DrawTexturedCube PROPERTIES FOLDER "Samples")
target_include_directories(DrawTexturedCube PUBLIC ${CMAKE_SOURCE_DIR}/glslang)
target_link_libraries(DrawTexturedCube PUBLIC glslang SPIRV "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib"
)
target_link_libraries(DrawTexturedCube PUBLIC glslang SPIRV "${Vulkan_LIBRARIES}")

View File

@@ -59,10 +59,10 @@ int main(int /*argc*/, char ** /*argv*/)
vk::su::TextureData textureData(physicalDevices[0], device);
commandBuffers[0]->begin(vk::CommandBufferBeginInfo());
textureData.setCheckerboardTexture(device, commandBuffers[0]);
textureData.setTexture(device, commandBuffers[0], vk::su::CheckerboardTextureCreator());
vk::su::BufferData uniformBufferData(physicalDevices[0], device, sizeof(glm::mat4x4), vk::BufferUsageFlagBits::eUniformBuffer);
vk::su::copyToDevice(device, uniformBufferData.deviceMemory, vk::su::createModelViewProjectionClipMatrix());
vk::su::copyToDevice(device, uniformBufferData.deviceMemory, vk::su::createModelViewProjectionClipMatrix(surfaceData.extent));
vk::UniqueDescriptorSetLayout descriptorSetLayout = vk::su::createDescriptorSetLayout(device, vk::DescriptorType::eUniformBuffer, textured);
vk::UniquePipelineLayout pipelineLayout = device->createPipelineLayoutUnique(vk::PipelineLayoutCreateInfo(vk::PipelineLayoutCreateFlags(), 1, &descriptorSetLayout.get()));
@@ -87,7 +87,7 @@ int main(int /*argc*/, char ** /*argv*/)
vk::su::updateDescriptorSets(device, descriptorSets[0], vk::DescriptorType::eUniformBuffer, &bufferInfo, &imageInfo);
vk::UniquePipelineCache pipelineCache = device->createPipelineCacheUnique(vk::PipelineCacheCreateInfo());
vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline(device, pipelineCache, vertexShaderModule, fragmentShaderModule, sizeof(texturedCubeData[0]), pipelineLayout, renderPass);
vk::UniquePipeline graphicsPipeline = vk::su::createGraphicsPipeline(device, pipelineCache, vertexShaderModule, fragmentShaderModule, sizeof(texturedCubeData[0]), true, pipelineLayout, renderPass);
/* VULKAN_KEY_START */