Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new samples via script generates non-working code #1062

Closed
SaschaWillems opened this issue Jun 7, 2024 · 0 comments · Fixed by #1073
Closed

Creating new samples via script generates non-working code #1062

SaschaWillems opened this issue Jun 7, 2024 · 0 comments · Fixed by #1073
Labels
bug Something isn't working

Comments

@SaschaWillems
Copy link
Collaborator

SaschaWillems commented Jun 7, 2024

While unifying our framework we obviously forgot to update the template for new samples. Generating a new sample via the provided script, one gets non-working code with the template specialization for the constructor missing:

std::unique_ptr<vkb::VulkanSample> create_ray_tracing_position_fetch();

This now needs to be

std::unique_ptr<vkb::VulkanSample<vkb::BindingType::C>> create_ray_tracing_position_fetch();

It also looks like some stuff used in the template is no longer directly accessible, e.g. this won't compile anymore:

	if (device)
	{
		vkDestroyPipeline(get_device().get_handle(), sample_pipeline, nullptr);
		vkDestroyPipelineLayout(get_device().get_handle(), sample_pipeline_layout, nullptr);
	}

And should be

	if (has_device())
	{
		vkDestroyPipeline(get_device().get_handle(), sample_pipeline, nullptr);
		vkDestroyPipelineLayout(get_device().get_handle(), sample_pipeline_layout, nullptr);
	}

So we need to update our templates and in the future make sure that templates continue to work when merging framework related changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant