Skip to content

Commit

Permalink
Merge pull request #2216 from KhronosGroup/buffer-reference-2
Browse files Browse the repository at this point in the history
GLSL: Use buffer_reference2 instead of 1.
  • Loading branch information
HansKristian-Work authored Oct 11, 2023
2 parents 082b1df + 255ff2b commit 724433d
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Bar;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Bar;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer PtrUint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer RO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Node;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;

layout(buffer_reference) buffer uint8_tPointer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Alias;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference, buffer_reference_align = 8) buffer uvec4Pointer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer uvec4Pointer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference, buffer_reference_align = 4) buffer uintPointer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference, buffer_reference_align = 4) buffer uint0_Pointer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_nonuniform_qualifier : require
#extension GL_KHR_shader_subgroup_ballot : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Bar;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Bar;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
#extension GL_EXT_buffer_reference_uvec2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer PtrUint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#version 450
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer RO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference : require
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Node;
Expand Down
2 changes: 1 addition & 1 deletion spirv_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ void CompilerGLSL::find_static_extensions()
SPIRV_CROSS_THROW("GL_EXT_buffer_reference requires ESSL 320.");
else if (!options.es && options.version < 450)
SPIRV_CROSS_THROW("GL_EXT_buffer_reference requires GLSL 450.");
require_extension_internal("GL_EXT_buffer_reference");
require_extension_internal("GL_EXT_buffer_reference2");
}
else if (ir.addressing_model != AddressingModelLogical)
{
Expand Down

0 comments on commit 724433d

Please sign in to comment.