SPV: Allow push constant buffers to not have an instance name.
This commit is contained in:
parent
789086a820
commit
33f85b6e59
7 changed files with 89 additions and 9 deletions
17
Test/spv.pushConstantAnon.vert
Normal file
17
Test/spv.pushConstantAnon.vert
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 400
|
||||
|
||||
layout(push_constant) uniform Material {
|
||||
int kind;
|
||||
float fa[3];
|
||||
};
|
||||
|
||||
out vec4 color;
|
||||
|
||||
void main()
|
||||
{
|
||||
switch (kind) {
|
||||
case 1: color = vec4(0.2); break;
|
||||
case 2: color = vec4(0.5); break;
|
||||
default: color = vec4(fa[1]); break;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue