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

Framework ignores set order in vkCreatePipelineLayout call #127

Closed
jdahl opened this issue May 17, 2020 · 0 comments · Fixed by #141
Closed

Framework ignores set order in vkCreatePipelineLayout call #127

jdahl opened this issue May 17, 2020 · 0 comments · Fixed by #141

Comments

@jdahl
Copy link

jdahl commented May 17, 2020

Seem like the framework ignores that set order is important during the vkCreatePipelineLayout call so that the sets are in the correct order. It adds the sets in the semi random order that exists in descriptor_set_layouts. A fix for this can be to change

std::transform(descriptor_set_layouts.begin(), descriptor_set_layouts.end(), descriptor_set_layout_handles.begin(),
	               [](auto &descriptor_set_layout_it) { return descriptor_set_layout_it.second->get_handle(); });

to something like

	for (int setNr=0; setNr<4; setNr++)
	{
		if (descriptor_set_layouts[setNr] != nullptr)
			descriptor_set_layout_handles[setNr] = descriptor_set_layouts[setNr]->get_handle();
	}

in pipeline_layout.cpp
The change above assumes you use all sets in sequence. If there is holes in the sets like you dont use set 0 the framework should inject a empty set layout.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant