Skip to content

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

Open
asuessenbach wants to merge 2 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 2 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 force-pushed the unify_ShaderModule branch 2 times, most recently from b8689b5 to aab508d Compare July 21, 2026 15:43
@asuessenbach
asuessenbach requested a review from a team July 22, 2026 08:53
@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

asuessenbach commented Aug 11, 2026

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, this PR now fixes an error I get with 2 samples on main:

hpp_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

tomek-brcm
tomek-brcm previously approved these changes Aug 24, 2026

@tomek-brcm tomek-brcm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Works for me now.

@asuessenbach
asuessenbach dismissed tomek-brcm’s stale review August 24, 2026 14:11

The merge-base changed after approval.

tomek-brcm
tomek-brcm previously approved these changes Aug 24, 2026
@asuessenbach
asuessenbach dismissed tomek-brcm’s stale review August 24, 2026 17:05

The merge-base changed after approval.

@SaschaWillems

Copy link
Copy Markdown
Collaborator

Tested on Android and I'm seeing the same error as Tomek:

[error] Error Message: unordered_map::at: key not found

None of the samples work.

Maybe the last force push pushed a wrong/old commit?

@asuessenbach

Copy link
Copy Markdown
Contributor Author

@SaschaWillems You're right, that was wrong, somehow.

Hopefully, it's really fixed now (fingers crossed!) Could you please re-check?

@asuessenbach
asuessenbach requested review from a team and SaschaWillems September 1, 2026 06:57

@SaschaWillems SaschaWillems left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

This is now working as expected. Tested on Android 17 with a Google Pixel 9.

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.

3 participants