Skip to content
Snippets Groups Projects
Verified Commit 7412be6a authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#94] Fixed suffering after merge

parent 85b83901
No related branches found
No related tags found
1 merge request!77Resolve "SAF-R Module"
Pipeline #26992 passed
......@@ -108,7 +108,7 @@ int main(int argc, const char** argv) {
// since we only use one descriptor set (namely, desc set 0), directly address it
// recreate copies of the bindings and the handles (to check whether they are properly reused instead of actually recreated)
std::unordered_map<uint32_t, vkcv::DescriptorBinding> set0Bindings = firstMeshProgram.getReflectedDescriptors().at(0);
const vkcv::DescriptorBindings& set0Bindings = firstMeshProgram.getReflectedDescriptors().at(0);
auto set0BindingsExplicitCopy = set0Bindings;
vkcv::DescriptorSetLayoutHandle setLayoutHandle = core.createDescriptorSetLayout(set0Bindings);
......
......@@ -29,7 +29,6 @@ int main(int argc, const char** argv) {
applicationName,
VK_MAKE_VERSION(0, 0, 1),
{ vk::QueueFlagBits::eTransfer,vk::QueueFlagBits::eGraphics, vk::QueueFlagBits::eCompute },
{},
{ "VK_KHR_swapchain" }
);
......@@ -53,7 +52,10 @@ int main(int argc, const char** argv) {
computeShaderProgram.addShader(shaderStage, path);
});
vkcv::DescriptorSetHandle computeDescriptorSet = core.createDescriptorSet(computeShaderProgram.getReflectedDescriptors()[0]);
const vkcv::DescriptorBindings& computeDescriptorBindings = computeShaderProgram.getReflectedDescriptors().at(0);
vkcv::DescriptorSetLayoutHandle computeDescriptorSetLayout = core.createDescriptorSetLayout(computeDescriptorBindings);
vkcv::DescriptorSetHandle computeDescriptorSet = core.createDescriptorSet(computeDescriptorSetLayout);
const std::vector<vkcv::VertexAttachment> computeVertexAttachments = computeShaderProgram.getVertexAttachments();
......@@ -74,9 +76,10 @@ int main(int argc, const char** argv) {
safrShaderProgram.addShader(shaderStage, path);
});
uint32_t setID = 0;
std::vector<vkcv::DescriptorBinding> descriptorBindings = { safrShaderProgram.getReflectedDescriptors()[setID] };
vkcv::DescriptorSetHandle descriptorSet = core.createDescriptorSet(descriptorBindings);
const vkcv::DescriptorBindings& descriptorBindings = safrShaderProgram.getReflectedDescriptors().at(0);
vkcv::DescriptorSetLayoutHandle descriptorSetLayout = core.createDescriptorSetLayout(descriptorBindings);
vkcv::DescriptorSetHandle descriptorSet = core.createDescriptorSet(descriptorSetLayout);
//materials for the spheres
std::vector<safrScene::Material> materials;
......@@ -176,12 +179,14 @@ int main(int argc, const char** argv) {
(uint32_t)windowHeight,
safrPass,
{},
{ core.getDescriptorSet(descriptorSet).layout },
{ core.getDescriptorSetLayout(descriptorSetLayout).vulkanHandle },
false
};
vkcv::PipelineHandle safrPipeline = core.createGraphicsPipeline(safrPipelineDefinition);
vkcv::PipelineHandle computePipeline = core.createComputePipeline(computeShaderProgram, { core.getDescriptorSet(computeDescriptorSet).layout });
vkcv::PipelineHandle computePipeline = core.createComputePipeline(computeShaderProgram, {
core.getDescriptorSetLayout(computeDescriptorSetLayout).vulkanHandle
});
if (!safrPipeline || !computePipeline)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment