forked from KhronosGroup/SPIRV-Cross
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GLSL: Handle empty block declarations.
Similar fix as for structs.
- Loading branch information
1 parent
73726f3
commit 7562018
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
reference/shaders-no-opt/asm/comp/empty-ubo-block.noeliminate.asm.comp
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,12 @@ | ||
#version 460 | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
|
||
layout(binding = 15, std140) uniform type_Primitive | ||
{ | ||
int empty_struct_member; | ||
} Primitive; | ||
|
||
void main() | ||
{ | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
shaders-no-opt/asm/comp/empty-ubo-block.noeliminate.asm.comp
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,21 @@ | ||
OpCapability Shader | ||
%1 = OpExtInstImport "GLSL.std.450" | ||
OpMemoryModel Logical GLSL450 | ||
OpEntryPoint GLCompute %main "main" | ||
OpExecutionMode %main LocalSize 1 1 1 | ||
OpSource GLSL 460 | ||
OpName %main "main" | ||
OpName %type_Primitive "type_Primitive" | ||
OpName %Primitive "Primitive" | ||
OpDecorate %type_Primitive Block | ||
OpDecorate %Primitive DescriptorSet 0 | ||
OpDecorate %Primitive Binding 15 | ||
%void = OpTypeVoid | ||
%3 = OpTypeFunction %void | ||
%type_Primitive = OpTypeStruct | ||
%_ptr_Uniform_type_Primitive = OpTypePointer Uniform %type_Primitive | ||
%Primitive = OpVariable %_ptr_Uniform_type_Primitive Uniform | ||
%main = OpFunction %void None %3 | ||
%5 = OpLabel | ||
OpReturn | ||
OpFunctionEnd |
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