Skip to content

Vulkan: Re-Create main window pipeline #8041

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

Closed

Conversation

SuperRonan
Copy link

  • Added ImGui_ImplVulkan_ReCreateMainPipeline(...) to explicitly re-create the main window pipeline (when some of its properties are changed).
  • ImGui_ImplVulkan_ReCreateMainPipeline(...) does not implicitly use ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo, but a function parameter.
  • The main window pipeline is created only if possible during ImGui_ImplVulkan_Init(...) (if a render pass or rendering info are given), else it should be created with ImGui_ImplVulkan_ReCreateMainPipeline(...)
    R.
  • The rendering does seem to work properly only UNORM render target (with other formats, the GUI is missing a color correction). This will be fixed in a future PR.

- Added ImGui_ImplVulkan_ReCreateMainPipeline(...) to explicitly re-create the main window pipeline (when some of its properties are changed).
- ImGui_ImplVulkan_ReCreateMainPipeline(...) does not implicitly use ImGui_ImplVulkan_InitInfo::PipelineRenderingCreateInfo, but a function parameter.
- The main window pipeline is created only if possible during ImGui_ImplVulkan_Init(...) (if a render pass or rendering info are given), else it should be created with ImGui_ImplVulkan_ReCreateMainPipeline(...)
@SuperRonan
Copy link
Author

I will also write an extension of these changes for the docking branch.

- The default behavior of imgui_impl_vulkan does not change (no color correction is applied).
- A color correction method is decided at pipeline compile time (through a vulkan specialization constant)
- Color correction parameters can either be set at pipeline compile time (static mode), or through push_constant (dynamic mode, default)
- A gamma correction mode is implemented (and an extra alpha gamma correction).
- New color modes can easily be added.
@SuperRonan
Copy link
Author

I also added a optional color correction to the imgui fragment shader.
It should not alter the default behavior of imgui_impl_vulkan.

@SuperRonan SuperRonan closed this Oct 10, 2024
@ocornut
Copy link
Owner

ocornut commented Oct 10, 2024

?

@SuperRonan
Copy link
Author

I will re-open it soon (this evening or tomorrow) with more changes (and a docking version), I did not want to burden you a merge of an outdated version.

@ocornut
Copy link
Owner

ocornut commented Oct 10, 2024

You can push or force push to a same PR to update it!

But FYI doing multiple unrelated things in a same PR is the best way to get it to take years to get looked at.

Providing clear rational / proof / exemples for everything would be helpful too. Vulkan related changes are notoriously slow because people seem often happy to not explore all angles. (But an unmerged PR is often better than no PR, as the visibility helps people align toward a solution)

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants