Hans-Kristian Arntzen
45ad58a903
Implement more correct integer op handling.
...
In some cases we need to bitcast when dealing with int vs. uint.
SPIR-V allows inputs to be of different integer signedness, so we need
to deal with this somehow.
Add testing system to test SPIR-V assembly.
For now, test all possible combination for all major cases.
- IAdd (which doesn't care about input type as long as they're equal)
- SDiv/UDiv operations which case about input type.
- Arith/Logical right shifts.
- IEqual to test outputs to bvec, which shouldn't get output cast. Also
tests casting in function-like calls.
2016-05-13 15:23:33 +02:00
Hans-Kristian Arntzen
8869a167d6
Drop --vulkan flag to test_shaders.py
...
We can infer shader types from file extensions.
2016-05-11 20:02:31 +02:00
Hans-Kristian Arntzen
44ef367141
Handle padding for struct members in buffers.
...
Fixes earlier issues with struct-packing test.
2016-05-05 16:32:15 +02:00
Hans-Kristian Arntzen
2d38c6e192
Fixups for struct-packing test.
...
There seems to have been some changes to alignment in glslang here,
so workaround to verify that the other cases at least still work as expected.
2016-05-05 11:59:33 +02:00
Hans-Kristian Arntzen
f144b767ce
Always emit DescriptorSet decoration for Vulkan GLSL.
2016-05-05 11:53:43 +02:00
Hans-Kristian Arntzen
b7a30b659e
Remove stale reference shader.
2016-05-05 10:46:34 +02:00
Hans-Kristian Arntzen
dbee4e4346
Add support for Vulkan GLSL as output target.
...
Mostly useful for debugging SPIR-V where it is useful to see the
"original" Vulkan GLSL constructs which created the SPIR-V.
2016-05-05 10:44:45 +02:00
Hans-Kristian Arntzen
9d4b5c0c59
Use texel fetch instead of normalized sampling for subpass.
...
Cleaner output code, and matches more directly to how subpass reads work.
2016-05-05 09:19:38 +02:00
Hans-Kristian Arntzen
12cfbb221f
Add support for querying DecorationInputAttachmentIndex.
...
Was missing from OpDecoration handling.
2016-05-04 13:41:04 +02:00
Hans-Kristian Arntzen
b6e3a00976
Support sampler and texture as function arguments.
...
sampler is also not an lvalue type.
2016-04-19 11:27:17 +02:00
Hans-Kristian Arntzen
7652c90802
Add support for separate samplers and textures.
...
This will not really make sense for plain GLSL/ESSL target, but other
backends might want it and useful to have for debugging.
2016-04-19 11:13:47 +02:00
Hans-Kristian Arntzen
b424851706
Fix floating point OpMod.
...
Floating point mod uses separate builtin in GLSL.
2016-04-16 09:25:14 +02:00
Hans-Kristian Arntzen
ba0ab875c8
Fix cases where SPIR-V conditionally branches to loop headers.
...
We should check if we are actually branching back to loop header.
Fixes some logic when continue_block == loop_header.
2016-04-04 08:53:37 +02:00
Hans-Kristian Arntzen
92134e410a
Do not add dependencies for variables loaded from UniformConstant.
...
Fixes case where image variables (OpTypeImage), etc are
loaded from UniformConstant address space.
2016-04-01 19:58:26 +02:00
Hans-Kristian Arntzen
72e93672d3
Add array-of-SSBO test.
2016-03-22 14:49:43 +01:00
Hans-Kristian Arntzen
0ae2bcc3d0
Ensure that floating point literals are float.
...
Fixes regression from earlier workaround of std::to_string.
Update reference output.
2016-03-12 14:22:39 +01:00
Hans-Kristian Arntzen
75471fbb98
Initial commit.
2016-03-11 16:30:27 +01:00