AST: Fix shift conversions, which don't require matching types.
The base and shift amount need to be integers, but not of the same type. This fixes #1296 and replaces #1297.
This commit is contained in:
parent
6e899be5ec
commit
647fccaf2f
9 changed files with 1475 additions and 1413 deletions
57
Test/baseResults/spv.rankShift.comp.out
Executable file
57
Test/baseResults/spv.rankShift.comp.out
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
spv.rankShift.comp
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80006
|
||||
// Id's are bound by 33
|
||||
|
||||
Capability Shader
|
||||
Capability Int64
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main"
|
||||
ExecutionMode 4 LocalSize 54 1 1
|
||||
Source GLSL 450
|
||||
SourceExtension "GL_ARB_gpu_shader_int64"
|
||||
Name 4 "main"
|
||||
Name 8 "result"
|
||||
Name 11 "arg0"
|
||||
Name 15 "arg1"
|
||||
Decorate 11(arg0) Location 4
|
||||
Decorate 15(arg1) Location 5
|
||||
Decorate 32 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 64 0
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypeInt 64 1
|
||||
10: TypePointer UniformConstant 9(int)
|
||||
11(arg0): 10(ptr) Variable UniformConstant
|
||||
13: TypeInt 32 0
|
||||
14: TypePointer UniformConstant 13(int)
|
||||
15(arg1): 14(ptr) Variable UniformConstant
|
||||
29: TypeVector 13(int) 3
|
||||
30: 13(int) Constant 54
|
||||
31: 13(int) Constant 1
|
||||
32: 29(ivec3) ConstantComposite 30 31 31
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(result): 7(ptr) Variable Function
|
||||
12: 9(int) Load 11(arg0)
|
||||
16: 13(int) Load 15(arg1)
|
||||
17: 9(int) ShiftLeftLogical 12 16
|
||||
18: 6(int) Bitcast 17
|
||||
Store 8(result) 18
|
||||
19: 9(int) Load 11(arg0)
|
||||
20: 13(int) Load 15(arg1)
|
||||
21: 9(int) ShiftRightArithmetic 19 20
|
||||
22: 6(int) Bitcast 21
|
||||
Store 8(result) 22
|
||||
23: 13(int) Load 15(arg1)
|
||||
24: 6(int) Load 8(result)
|
||||
25: 6(int) ShiftLeftLogical 24 23
|
||||
Store 8(result) 25
|
||||
26: 13(int) Load 15(arg1)
|
||||
27: 6(int) Load 8(result)
|
||||
28: 6(int) ShiftRightLogical 27 26
|
||||
Store 8(result) 28
|
||||
Return
|
||||
FunctionEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue