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
15
Test/spv.rankShift.comp
Normal file
15
Test/spv.rankShift.comp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 450
|
||||
#extension GL_ARB_gpu_shader_int64 : require
|
||||
|
||||
layout(local_size_x = 54) in;
|
||||
|
||||
layout(location=4) uniform int64_t arg0;
|
||||
layout(location=5) uniform uint arg1;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint64_t result = arg0 << arg1;
|
||||
result = arg0 >> arg1;
|
||||
result <<= arg1;
|
||||
result >>= arg1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue