Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for GL_EXT_shader_explicit_arithmetic_types causing errors on primitive type conversions and functions #175

Open
Cazadorro opened this issue Dec 1, 2022 · 1 comment

Comments

@Cazadorro
Copy link

Cazadorro commented Dec 1, 2022

I have the following enabled:

#extension GL_EXT_shader_explicit_arithmetic_types         : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int8    : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int16   : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int32   : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int64   : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float32 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float64 : enable

see https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_shader_explicit_arithmetic_types.txt

primitive types and conversions are not known to this plugin, so I get erroneous errors. See:

i32vec4 sort_dsc(i32vec4 value){
    //http://pages.ripco.net/~jgamble/nw.html
    if (value[0] < value[1]){
        swap(value[0], value[1]);
    }
    if (value[2] < value[3]){
        swap(value[2], value[3]);
    }
    if (value[0] < value[2]){
        swap(value[0], value[2]);
    }
    if (value[1] < value[3]){
        swap(value[1], value[3]);
    }
    if (value[1] < value[2]){
        swap(value[1], value[2]);
    }
    return value;
}

I get "subscripted expression must be of array matrix or vector type".

here;

int32_t wrap(int32_t value, int32_t max){
    return ((value % max) + max) % max;
}

I get "incompatible operands int32_t and int32_t".

for things like

uint8_t foo = uint8_t(0); 
uint bar = uint(bar);

I get "cannot resolve constructor uint(uint8_t)" and it suggests basically everything not in GL_EXT_shader_explicit_arithmetic_types
these types, in addition to the i/u8,16,32 and f16->f64 should be recognized as built in types just as u/i64vec2->4 and u/int64_t are.

Versions
Clion 2022.3,
Plugin 1.23

@Cazadorro Cazadorro changed the title No support for GL_EXT_shader_explicit_arithmetic_types causing errors on primitive type conversions No support for GL_EXT_shader_explicit_arithmetic_types causing errors on primitive type conversions and functions Dec 1, 2022
@Darkyenus
Copy link
Owner

They keep adding types faster than I can add them! This should be a fairly easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants