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: Ignore bogus constant/undefs which use block types.
This is banned in more recent SPIR-V. We cannot implement this in any reasonable way since block types don't participate as normal types in GLSL.
- Loading branch information
1 parent
7562018
commit be94425
Showing
5 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
reference/shaders-no-opt/asm/comp/block-undef.noeliminate.invalid.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,13 @@ | ||
#version 460 | ||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; | ||
|
||
struct FHitGroupRootConstants | ||
{ | ||
uint BaseInstanceIndex; | ||
uint UserData; | ||
}; | ||
|
||
void main() | ||
{ | ||
} | ||
|
34 changes: 34 additions & 0 deletions
34
shaders-no-opt/asm/comp/block-undef.noeliminate.invalid.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,34 @@ | ||
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 %FHitGroupRootConstants "FHitGroupRootConstants" | ||
OpMemberName %FHitGroupRootConstants 0 "BaseInstanceIndex" | ||
OpMemberName %FHitGroupRootConstants 1 "UserData" | ||
OpName %type_StructuredBuffer_FHitGroupRootConstants "type_StructuredBuffer_FHitGroupRootConstants" | ||
OpMemberName %type_StructuredBuffer_FHitGroupRootConstants 0 "_m0" | ||
OpName %HitGroupData "HitGroupData" | ||
OpMemberDecorate %FHitGroupRootConstants 0 Offset 0 | ||
OpMemberDecorate %FHitGroupRootConstants 1 Offset 4 | ||
OpDecorate %_runtimearr_FHitGroupRootConstants ArrayStride 8 | ||
OpMemberDecorate %type_StructuredBuffer_FHitGroupRootConstants 0 NonWritable | ||
OpMemberDecorate %type_StructuredBuffer_FHitGroupRootConstants 0 Offset 0 | ||
OpDecorate %type_StructuredBuffer_FHitGroupRootConstants BufferBlock | ||
OpDecorate %HitGroupData DescriptorSet 0 | ||
OpDecorate %HitGroupData Binding 20 | ||
%void = OpTypeVoid | ||
%3 = OpTypeFunction %void | ||
%uint = OpTypeInt 32 0 | ||
%FHitGroupRootConstants = OpTypeStruct %uint %uint | ||
%_runtimearr_FHitGroupRootConstants = OpTypeRuntimeArray %FHitGroupRootConstants | ||
%type_StructuredBuffer_FHitGroupRootConstants = OpTypeStruct %_runtimearr_FHitGroupRootConstants | ||
%_ptr_StorageBuffer_type_StructuredBuffer_FHitGroupRootConstants = OpTypePointer StorageBuffer %type_StructuredBuffer_FHitGroupRootConstants | ||
%HitGroupData = OpVariable %_ptr_StorageBuffer_type_StructuredBuffer_FHitGroupRootConstants StorageBuffer | ||
%728 = OpUndef %_ptr_StorageBuffer_type_StructuredBuffer_FHitGroupRootConstants | ||
%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
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