mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
const in ShaderStage that represents vertex and fragment access (#1229)
* const in ShaderStage that represents vertex and fragment access We can store `ShaderStage`s as const values or members of const structs in all individual cases, but for example `ShaderStage::VERTEX | ShaderStage::FRAGMENT` cannot be stored in a const. This is not very elegant, but would be convenient. * Correct VERTEX_FRAGMENT definition VERTEX_FRAGMENT definition now follows directly from the bit representation of `ShaderStage::VERTEX` and `Shaderstage::FRAGMENT` such that it does not need to be independently maintained.
This commit is contained in:
1 parent
f430adb828
commit
ce4668a7ac
1 file changed
+2
@@ -566,6 +566,8 @@ bitflags::bitflags! {
|
||||
const VERTEX = 1;
|
||||
/// Binding is visible from the fragment shader of a render pipeline.
|
||||
const FRAGMENT = 2;
|
||||
/// Binding is visible from the vertex and fragment shaders of a render pipeline.
|
||||
const VERTEX_FRAGMENT = Self::VERTEX.bits | Self::FRAGMENT.bits;
|
||||
/// Binding is visible from the compute shader of a compute pipeline.
|
||||
const COMPUTE = 4;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user