-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix runtime array of BufferDeviceAddresses
- Loading branch information
1 parent
fa71fe8
commit 24d5853
Showing
4 changed files
with
403 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#version 460 | ||
#extension GL_EXT_buffer_reference2: require | ||
#extension GL_EXT_scalar_block_layout : enable | ||
|
||
layout(buffer_reference, scalar) readonly buffer VertexBufferPtr { | ||
vec4 v[]; | ||
}; | ||
|
||
// Has a OpTypeRuntimeArray | ||
layout(binding = 1, set = 0, scalar) readonly buffer Vertices { | ||
VertexBufferPtr vertex_buffers[]; | ||
}; | ||
|
||
void main() { | ||
gl_Position = vertex_buffers[gl_VertexIndex].v[gl_VertexIndex]; | ||
} |
Binary file not shown.
Oops, something went wrong.