Skip to content

Unify vkb::ShaderModule and vkb::core::HPPShaderModule into vkb::core::ShaderModule<bindingType> - #1556

Open
asuessenbach wants to merge 6 commits into
KhronosGroup:mainfrom
asuessenbach:unify_ShaderModule
Open

Unify vkb::ShaderModule and vkb::core::HPPShaderModule into vkb::core::ShaderModule<bindingType>#1556
asuessenbach wants to merge 6 commits into
KhronosGroup:mainfrom
asuessenbach:unify_ShaderModule

Conversation

@asuessenbach

Copy link
Copy Markdown
Contributor

Description

Next unified class on C- and C++-bindings.
Comes together with unification of vkb::ShaderResourceType, vkb::ShaderResourceMode, vkb::ShaderResourceQualifiers, vkb::ShaderResource, vkb::ShaderVariant, vkb::ShaderSource, and vkb::SPIRVReflection.

Build tested on Win11 with VS2026. Run tested on Win11 with NVidia GPU.

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

  • I have tested the sample on at least one compliant Vulkan implementation
  • If the sample is vendor-specific, I have tagged it appropriately
  • I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
  • Any dependent assets have been merged and published in downstream modules
  • For new samples, I have added a paragraph with a summary to the appropriate chapter in the readme of the folder that the sample belongs to e.g. api samples readme
  • For new samples, I have added a tutorial README.md file to guide users through what they need to know to implement code using this feature. For example, see conditional_rendering
  • For new samples, I have added a link to the Antora navigation so that the sample will be listed at the Vulkan documentation site

@asuessenbach
asuessenbach requested a review from a team July 22, 2026 08:53
SaschaWillems and others added 2 commits August 10, 2026 08:28
* Add sample for descriptor heaps

* First working version

* Trying to fix clang format

* Clang format

* Add Slang and HLSL shaders

* No longer pre-record command buffers

* Cleanup

* Cleanup

* UBOs per Frame

* Add precompiled SPIR-V

* Override render pass / framebuffer creation

Both not required, as the sample uses dynamic rendering

* Slight restructuring

* Slight restructuring

* Clang format

* Cleanup

* Remove extension not required
Core since 1.1

* Reserved range offsets

* Variable naming

* Minor fixes

* Adjust offset and size calculations

* Add tutorial for descriptor heap sample

* Add compiled shaders

* Add new sample to navigation

* Clean up, push data documentation

* Fix clang format

* Variable naming

* Spelling and grammar

* Add comparison to traditional descriptor bindings

* Minor fix

* Add some key benefits of descriptor heaps

* Address PR feedback

* Adjust heap size calculations

* Address PR feedback

* Add and use non-const memory access

* Use non-uniform indexing to access textures

* Add note on where to find other binding mapping options
* Add simple API sample for VK_EXT_present_timing.

* Address review comments

- Fix "times domains" typo in README
- Add missing blank lines before bullet lists in README
- Rename desired_swapchain_images to desired_swapchain_image_count
- Simplify can_use_present_timing boolean assignment

* Remove double-assignment of time domains / timing properties counters
@tomek-brcm

Copy link
Copy Markdown

I'm hitting 2 problems:

[error] Error Message: unordered_map::at
[error] Failed when running application Compute N-Body simulation
[info] Benchmark for Compute N-Body simulation completed in 0 seconds (ran 0 frames, averaged nan fps)
[error] -1363947098 - VUID-vkDestroyPipeline-pipeline-parameter: vkDestroyPipeline(): pipeline Invalid VkPipeline Object 0x2c895a0.
The Vulkan spec states: If pipeline is not VK_NULL_HANDLE, pipeline must be a valid VkPipeline handle (https://docs.vulkan.org/spec/latest/chapters/pipelines.html#VUID-vkDestroyPipeline-pipeline-parameter)

followed by:
vulkan_samples: Vulkan-ValidationLayers/layers/./thread_tracker/thread_safety_validation.h:122: std::shared_ptrthreadsafety::ObjectUseData threadsafety::Counter::FindObject(T, const Location&) [with T = VkPipeline_T*]: Assertion `object_table.contains(object)' failed.
Aborted (core dumped)

@asuessenbach

Copy link
Copy Markdown
Contributor Author

@tomek-brcm Thanks for spotting this failure. Fix was easy, I've no idea how that could have slept through.

Besides that, I get errors with 4 samples, both with main and with this branch:

fragment_density_map:

[error] Required device extension VK_EXT_fragment_density_map not available, cannot run
[error] Error Message: Extensions not present : ERROR_EXTENSION_NOT_PRESENT
[error] Failed when running application Fragment Density Map

16bit_storage_input_output:

[error] Error Message: Requested required feature <VkPhysicalDevice16BitStorageFeatures::storageInputOutput16> is not supported
[error] Failed when running application 16-bit Storage InputOutput

hp_pipeline_cache:

[error] Error Message: Failed to open file for reading at path: shaders/
[error] Failed when running application HPP Pipeline Management

pipeline_cache:

[error] Error Message: Failed to open file for reading at path: shaders/
[error] Failed when running application Pipeline Management

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 this pull request may close these issues.

4 participants