SPV: Implement extension SPV_KHR_shader_draw_parameters.
This commit is contained in:
parent
dd2fc1f3d8
commit
f3b27471f8
7 changed files with 158 additions and 24 deletions
16
Test/spv.shaderDrawParams.vert
Normal file
16
Test/spv.shaderDrawParams.vert
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#version 450 core
|
||||
|
||||
#extension GL_ARB_shader_draw_parameters: enable
|
||||
|
||||
layout(binding = 0) uniform Block
|
||||
{
|
||||
vec4 pos[2][4];
|
||||
} block;
|
||||
|
||||
void main()
|
||||
{
|
||||
if ((gl_BaseVertexARB > 0) || (gl_BaseInstanceARB > 0))
|
||||
gl_Position = block.pos[0][gl_DrawIDARB % 4];
|
||||
else
|
||||
gl_Position = block.pos[1][gl_DrawIDARB % 4];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue