Add AccessQualifier
s to Image
, the Image!
macro and codegen
#1116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #1097 .
This PR adds an extra generic parameter to the
Image
struct inspirv-std
, extends theImage!
macro to accept a new argument of the formaccess=[readonly|writeonly|readwrite]
defaulting toreadonly
, and changes the codegen ofSpirvType::Image
to provideSome(access_qualifier)
instead ofNone
.This change isn't quite ready to merge and requires some additional input to resolve remaining issues. Trying to compile a simple shader according to the rust-gpu dev guide immediately runs into issues:
Shader Code
build.rs
This setup fails to compile with the error:
However adding
Capability::Kernel
to theSpirvBuilder
results in the following error, which also happens withspirv-unknown-vulkan1.2
:I am now out of my depth to be able to address this issue, but perhaps this is a hint as to why the access qualifier was not specified in the first place.