-
Notifications
You must be signed in to change notification settings - Fork 639
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
Dynamic state3 multisample rasterization #856
Open
pawel-jastrzebski-mobica
wants to merge
58
commits into
KhronosGroup:main
Choose a base branch
from
Mobica:dynamic_state3_multisample_rasterization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
a930066
Add initial test framework.
pawel-jastrzebski-mobica f36f9e6
Add MSAAm sample code.
pawel-jastrzebski-mobica 3c4b9fe
Add sample with SpaceModule scene.
pawel-jastrzebski-mobica e26d3da
Rendering proper BaseModule scene.
pawel-jastrzebski-mobica 0175f6a
Fix copyrights.
pawel-jastrzebski-mobica 0d06897
First version of MSAA works.
pawel-jastrzebski-mobica 1170d1b
Implement dynamic sample selection.
pawel-jastrzebski-mobica 46258c2
Add setter for last_requested_extension_feature.
pawel-jastrzebski-mobica 447a3ad
Fix clang-format.
pawel-jastrzebski-mobica 22c1930
Merge branch 'KhronosGroup:main' into dynamic_state3_multisample_rast…
pawel-jastrzebski-mobica 7e5319f
Fix copyright.
pawel-jastrzebski-mobica 4072330
Fix vulkan version.
pawel-jastrzebski-mobica 5e73402
Update readme.
pawel-jastrzebski-mobica 0f88145
Remove unneeded code from shader.
pawel-jastrzebski-mobica 2eed170
Fix copyright.
pawel-jastrzebski-mobica 032ca90
Add README.md
pawel-jastrzebski-mobica 6b3e879
Add sample to CMake.
pawel-jastrzebski-mobica 2e86179
Remove explicit reference from local viewport initializer.
pawel-jastrzebski-mobica 37d42ce
Change resources create/update logic.
pawel-jastrzebski-mobica 82be0a3
Fix clang-format.
pawel-jastrzebski-mobica ccc694c
Fix format for vertex input attribute descriptor.
pawel-jastrzebski-mobica c7b872f
Separate rendering for scene meshes with different rasterizer settings.
pawel-jastrzebski-mobica 5d04e70
Change camera position.
pawel-jastrzebski-mobica 792fc0a
Fix light position.
pawel-jastrzebski-mobica 94db8df
Update README files.
pawel-jastrzebski-mobica a805676
Update sample image.
pawel-jastrzebski-mobica d812e3e
Merge branch 'KhronosGroup:main' into dynamic_state3_multisample_rast…
pawel-jastrzebski-mobica d537ce4
Fix warnings.
pawel-jastrzebski-mobica 143196d
Fix typos in README files.
pawel-jastrzebski-mobica e5fb84c
Fix comment.
pawel-jastrzebski-mobica 4e9f813
Fix review comments.
pawel-jastrzebski-mobica 1bc20d4
Fix review comments.
pawel-jastrzebski-mobica 59686d3
Fix review comments.
pawel-jastrzebski-mobica e6f1413
Merge branch 'main' into dynamic_state3_multisample_rasterization
pawel-jastrzebski-mobica e6829cd
Rename project.
pawel-jastrzebski-mobica 92f0bbf
Fix review comments.
pawel-jastrzebski-mobica f037dc3
Add multisampling to GUI rendering.
pawel-jastrzebski-mobica d2016f3
Update README
pawel-jastrzebski-mobica ca0a459
Change rotation speed.
pawel-jastrzebski-mobica f4d0e0e
Fix clang-format.
pawel-jastrzebski-mobica 9ca4309
Update copyright year.
pawel-jastrzebski-mobica 8d4c1d1
Copyright fix in CMakeLists
Mateusz-Kowalewski-Mobica 7e1e986
Fix review comments.
pawel-jastrzebski-mobica b2421ad
Fix review comments.
pawel-jastrzebski-mobica 0b806c6
Fix VUID-VkSubpassDescription-pResolveAttachments-00848
Mateusz-Kowalewski-Mobica 7e2434b
Image destroy refactor
Mateusz-Kowalewski-Mobica c4d78cb
Fix windows build issue
Mateusz-Kowalewski-Mobica ff3708b
Add dynamic rendering
Mateusz-Kowalewski-Mobica 6f73a24
Gui merge conflicts fix
Mateusz-Kowalewski-Mobica 65b93cd
Fix regressions after implementing dynamic rendering
Mateusz-Kowalewski-Mobica 7af25fd
Merge branch 'main' into dynamic_state3_multisample_rasterization
Mateusz-Kowalewski-Mobica bdb6973
Adjust sample to changes from PR#910
Mateusz-Kowalewski-Mobica 38fb8bd
Fix sync issue
Mateusz-Kowalewski-Mobica 130d3e4
Documentation update
Mateusz-Kowalewski-Mobica 8aacbb8
Merge branch 'main' into dynamic_state3_multisample_rasterization
Mateusz-Kowalewski-Mobica 5467a77
Merge branch 'main' into dynamic_state3_multisample_rasterization
Mateusz-Kowalewski-Mobica 7acbd64
Remove unused feature
Mateusz-Kowalewski-Mobica 22b56ac
VK objects initializations added
Mateusz-Kowalewski-Mobica File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
samples/extensions/dynamic_multisample_rasterization/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright (c) 2024, Mobica Limited | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Licensed under the Apache License, Version 2.0 the "License"; | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_LIST_DIR} NAME) | ||
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_LIST_DIR} PATH) | ||
get_filename_component(CATEGORY_NAME ${PARENT_DIR} NAME) | ||
|
||
add_sample( | ||
ID ${FOLDER_NAME} | ||
CATEGORY ${CATEGORY_NAME} | ||
AUTHOR "Mobica" | ||
NAME "Extended Dynamic State3 Multisample Rasterization" | ||
DESCRIPTION "Sample description" | ||
SHADER_FILES_GLSL | ||
"dynamic_multisample_rasterization/model.vert" | ||
"dynamic_multisample_rasterization/model.frag") |
43 changes: 43 additions & 0 deletions
43
samples/extensions/dynamic_multisample_rasterization/README.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//// | ||
- Copyright (c) 2024, Mobica Limited | ||
- | ||
- SPDX-License-Identifier: Apache-2.0 | ||
- | ||
- Licensed under the Apache License, Version 2.0 the "License"; | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- http://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
- | ||
//// | ||
|
||
// Extended dynamic_state3: Rasterization samples | ||
|
||
|
||
== Overview | ||
|
||
This sample demonstrates one of the functionalities of VK_EXT_extended_dynamic_state3 related to rasterization samples. | ||
The extension can be used to dynamically change sampling without need to swap pipelines. | ||
image:image/image.png[] | ||
SaschaWillems marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
== Enabling the extension | ||
|
||
To be able to use this extension in Vulkan API: | ||
`VK_EXT_extended_dynamic_state3` depends on `VK_KHR_get_physical_device_properties2`, which is promoted to Vulkan 1.1. That is, to use this extension, `VK_EXT_extended_dynamic_state3` and either `VK_KHR_get_physical_device_properties2` or Vulkan 1.1 are required. | ||
|
||
== Using the extension | ||
|
||
To use the extension: | ||
1) `VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT` must be added to `VkPipelineDynamicStateCreateInfo`. | ||
2) Method `void vkCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples)` should be called with the active command buffer. | ||
|
||
== Resources | ||
|
||
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_extended_dynamic_state3.html | ||
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetRasterizationSamplesEXT.html |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would stay on the same abstraction level as this class, and return a
vkb::core::Sampler const &
, andvkb::core::ImageView const &
, respectively.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
sampler
andimage_view
are defined asstd::unique_ptr
's it would mean that it's either returned bystd::move
- not a good idea to change ownership of a pointer of internal class member. Or alternatively, in my opinion even worse to return raw pointer. It could be also defined asstd::shared_ptr
and this means a design change. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, returning a
vkb::core::Sampler const &
and avkb::core::ImageView const &
would be right.As as they both don't support copy construction or copy assignment, you would not be able to accidentally assign or copy them.