glslang/Test/baseResults/spv.bufferhandle16.frag.out
Jeff Bolz be63facd80 Handle buffer references vs 'const'
Allow constructors to and from references to be constant folded. Section 4.3.3
says constructors whose arguments are all constant expressions must fold.

Disallow 'const' on buffer reference types. It is not a 'non-void transparent
basic data type' (it is not considered 'basic').

Handle buffer reference constants (which can be assigned to a non-const reference,
or can be further folded to another type of constant) by converting to
'constructor(uint64_t constant)' in addConversion.

Disallow == and != operators on reference types.
2019-03-04 12:46:11 -06:00

77 lines
3.7 KiB
Plaintext

spv.bufferhandle16.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 37
Capability Shader
Capability Int64
Capability CapabilityPhysicalStorageBufferAddressesEXT
Extension "SPV_EXT_physical_storage_buffer"
1: ExtInstImport "GLSL.std.450"
MemoryModel PhysicalStorageBuffer64EXT GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_buffer_reference"
SourceExtension "GL_EXT_scalar_block_layout"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64"
Name 4 "main"
Name 8 "T1"
MemberName 8(T1) 0 "x"
Name 10 "a"
Name 14 "b"
Name 17 "c"
Name 23 "d"
Name 25 "e"
Name 36 "x"
MemberDecorate 8(T1) 0 Offset 0
Decorate 8(T1) Block
Decorate 10(a) DecorationAliasedPointerEXT
Decorate 14(b) DecorationAliasedPointerEXT
Decorate 17(c) DecorationAliasedPointerEXT
Decorate 23(d) DecorationAliasedPointerEXT
Decorate 25(e) DecorationAliasedPointerEXT
2: TypeVoid
3: TypeFunction 2
TypeForwardPointer 6 PhysicalStorageBufferEXT
7: TypeInt 32 1
8(T1): TypeStruct 7(int)
6: TypePointer PhysicalStorageBufferEXT 8(T1)
9: TypePointer Function 6(ptr)
11: TypeInt 64 0
12: 11(int64_t) Constant 4 0
15: 11(int64_t) Constant 5 0
18: TypeBool
19: 18(bool) ConstantTrue
26: 11(int64_t) Constant 6 0
28: 11(int64_t) Constant 7 0
31: 7(int) Constant 3
32: TypeInt 32 0
33: 32(int) Constant 3
34: TypeArray 7(int) 33
35: TypePointer Private 34
36(x): 35(ptr) Variable Private
4(main): 2 Function None 3
5: Label
10(a): 9(ptr) Variable Function
14(b): 9(ptr) Variable Function
17(c): 9(ptr) Variable Function
23(d): 9(ptr) Variable Function
25(e): 9(ptr) Variable Function
13: 6(ptr) Bitcast 12
Store 10(a) 13
16: 6(ptr) Bitcast 15
Store 14(b) 16
20: 6(ptr) Load 10(a)
21: 6(ptr) Load 14(b)
22: 6(ptr) Select 19 20 21
Store 17(c) 22
24: 6(ptr) Load 14(b)
Store 23(d) 24
27: 6(ptr) Bitcast 26
29: 6(ptr) Bitcast 28
30: 6(ptr) Select 19 27 29
Store 25(e) 30
Return
FunctionEnd