Commit Graph

8 Commits

Author SHA1 Message Date
Panagiotis Christopoulos Charitos
6113723e40 Add support for 64bit integer types and 64bit integer vector types to bitCount() builtin.
Fixes #2630
2021-05-03 14:26:11 +02:00
Alexander Galazin
32def9f467 Rename GL_KHX_shader_explicit_arithmetic_types to GL_EXT_shader_explicit_arithmetic_types 2018-12-03 13:16:59 +01:00
Grigory Dzhavadyan
4c9876b34c Add names for composite constants in SPIR-V
Consider the following code:

    layout(constant_id=0) const int Y = 1;
    layout(constant_id=1) const int Z = 2;
    layout(constant_id=3) const int X = Y + Z;

Previously, it would produce SPIR-V decorations like this:

    Decorate 21(Y) SpecId 1
    Decorate 22 SpecId 3
    Decorate 33(Z) SpecId 0

This seems inaccurate, since the spec constant `X` that is dependent on
the two others did not get a name in the SPIR-V decorations. This behavior
may potentially negatively affect shader introspection capabilities.

This change alters the behavior to always add a name, which results in the code
above producing the following decorations:

    Decorate 21(Y) SpecId 1
    Decorate 22(X) SpecId 3
    Decorate 33(Z) SpecId 0
2018-11-02 00:45:12 -07:00
John Kessenich
647fccaf2f 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.
2018-03-15 21:11:36 -06:00
John Kessenich
66011cb2c2 SPV: Implement Vulkan 1.1 features and extensions. 2018-03-06 16:12:04 -07:00
Rex Xu
99c4dd16db Preprocessor: UINT_MAX is translated to constant incorrectly. 2016-09-09 17:06:15 +08:00
Rex Xu
64bcfdb632 Parser: Add 64-bit type conversion for specialization constant. 2016-09-05 22:20:28 +08:00
Rex Xu
8ff43de891 Implement the extension GL_ARB_gpu_shader_int64
- Add new keyword int64_t/uint64_t/i64vec/u64vec.
- Support 64-bit integer literals (dec/hex/oct).
- Support built-in operators for 64-bit integer type.
- Add implicit and explicit type conversion for 64-bit integer type.
- Add new built-in functions defined in this extension.
2016-04-30 13:34:34 +08:00