-
Notifications
You must be signed in to change notification settings - Fork 782
Resolve VVL warning on incompatible OpTypeImage vs. image view format #1443
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
base: main
Are you sure you want to change the base?
Conversation
|
I'd prefer using shaderStorageImageRead/WriteWithoutFormat and the GL_EXT_shader_image_load_formatted GLSL extension. This is widely supported. Afaik all devices that offer HW ray tracing also support that feature (which is a Vulkan 1.0 feature). Having to specify image formats in the shader is actually a legacy OpenGL thing. I do that in my own samples too btw. |
But it would require support of that extension. I don't know anything about its availability. |
|
No, it only requires support for shaderStorageImageRead/WriteWithoutFormat. And those are universally supported. |
|
Would it require something more than just requesting that I still get the same VVL warning. |
|
... and requesting both, |
|
What shader language are you using? GLSL, HLSL or Slang? |
I'm using the default, which I think is GLSL. |
|
You need to remove the explicit image format from the shader and (At least for GLSL) need to enable the required extension. E.g. #version 460
#extension GL_EXT_ray_tracing : enable
#extension GL_EXT_shader_image_load_formatted : enable
layout(binding = 0, set = 0) uniform accelerationStructureEXT topLevelAS;
layout(binding = 1, set = 0) uniform image2D image;With this change and enabling both features, the validation error no longer shows up. |
|
@SaschaWillems I think, it's easier, when you craft a PR to resolve that issue using those features? |
|
Sure, see #1452 :) |
Description
One possible way to resolve the VVL warnings on incompatible
OpTypeImage, without the need of additional extensions.Just needs to switch the generated image from BGRA8 to RGBA8, and overwrites the function
create_render_contextto enforce selection of an RGBA surface format.Build tested on Win10 with VS2022. Run tested on Win10 with NVidia GPU.
Fixes #1423
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: