Skip to content

Fix validation warning for VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL c…#1148

Merged
MarkCallow merged 2 commits intomainfrom
issue1092
Mar 16, 2026
Merged

Fix validation warning for VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL c…#1148
MarkCallow merged 2 commits intomainfrom
issue1092

Conversation

@MarkCallow
Copy link
Copy Markdown
Collaborator

@MarkCallow MarkCallow commented Mar 16, 2026

…ase.

For the VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL case of setImageLayout, where dstAccessMask is VK_ACCESS_SHADER_READ_BIT, settingdestStageFlags to VK_PIPELINE_STAGE_ALL_COMMANDS_BIT is invalid usage and is flagged by the validator in recent Vulkan SDKs. Change dstStageFlags for this case to VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT | VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT.

Fixes #1092.

Includes completely unrelated fixes for warnings that are new in Emscripten 5.0.3 so that CI builds are successful.

  • Set -Wno-experimental to disable compile- and link-time warnings that sdl3 is still experimental.
  • Change EMSCRIPTEN pre-processor macro to __EMSCRIPTEN__ to stop deprecation warnings.

- Set -Wno-experimental to disablecCompile warning that sdl3 is still
  experimental.
- Change EMSCRIPTEN pre-processor macro to __EMSCRIPTEN__ to avoid
  deprecation warnings.
@MarkCallow MarkCallow merged commit 2914abe into main Mar 16, 2026
41 checks passed
@MarkCallow MarkCallow deleted the issue1092 branch March 16, 2026 12:47
richgel999 pushed a commit to BinomialLLC/KTX-Software-Binomial-Fork that referenced this pull request Mar 18, 2026
KhronosGroup#1148)

…ase.

For the `VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL` case of
`setImageLayout`, where `dstAccessMask` is `VK_ACCESS_SHADER_READ_BIT`,
setting`destStageFlags` to `VK_PIPELINE_STAGE_ALL_COMMANDS_BIT` is
invalid usage and is flagged by the validator in recent Vulkan SDKs.
Change `dstStageFlags` for this case to
`VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT |
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT`.

Fixes KhronosGroup#1092.

Includes completely unrelated fixes for warnings that are new in
Emscripten 5.0.3 so that CI builds are successful.
- Set -Wno-experimental to disable compile- and link-time warnings that
sdl3 is still experimental.
- Change `EMSCRIPTEN` pre-processor macro to `__EMSCRIPTEN__` to stop
deprecation warnings.
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.

Using 'ktxTexture_VkUpload' with an image layout of 'VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL' causes an validation error.

1 participant