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

Add an example for reflection of parameter blocks #6161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tangent-vector
Copy link
Contributor

The example loads a shader program, compiles it for Vulkan, and then uses reflection information to set up descriptor set layouts and a pipeline layout. It then validates that the pipeline layout that is created is compatible with the compiled code, by using them together to make a pipeline state object with the validation layer enabled.

The basic flow of the application follows the presentation in the companion article, and references its sections.

This is example could be expanded in a few ways:

  • A D3D12 path could be added, to show the comparable operations for creating a root signature from reflection data

  • The existing shader could be modified to touch/use more of its parameter data, to help ensure that any errors would be caught by the validation layer

  • The set of shader files/modules that get loaded automatically could be expanded, to test more cases

  • The code could be expanded to handle more than just compute shaders, by allowing for multiple-entry-point files to be loaded for rasterization or ray-tracing pipelines

The example loads a shader program, compiles it for Vulkan, and then uses reflection information to set up descriptor set layouts and a pipeline layout.
It then validates that the pipeline layout that is created is compatible with the compiled code, by using them together to make a pipeline state object with the validation layer enabled.

The basic flow of the application follows the presentation in the companion article, and references its sections.

This is example could be expanded in a few ways:

* A D3D12 path could be added, to show the comparable operations for creating a root signature from reflection data

* The existing shader could be modified to touch/use more of its parameter data, to help ensure that any errors would be caught by the validation layer

* The set of shader files/modules that get loaded automatically could be expanded, to test more cases

* The code could be expanded to handle more than just compute shaders, by allowing for multiple-entry-point files to be loaded for rasterization or ray-tracing pipelines
@tangent-vector tangent-vector added the pr: non-breaking PRs without breaking changes label Jan 23, 2025
@tangent-vector tangent-vector requested a review from a team as a code owner January 23, 2025 00:49
@csyonghe
Copy link
Collaborator

Need to fix build and format errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants