Add support for extension GL_ARB_shader_bit_encoding (#2183)

This commit is contained in:
pmistryNV 2020-04-17 04:24:12 -07:00 committed by GitHub
parent 4d2298bfd7
commit 9f46e3dd5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 3 deletions

View file

@ -57,4 +57,25 @@ double type3 = 2.0;
int absTest = sqrt(type3);
double absTest2 = sqrt(type3);
double absTest3 = sqrt(2);
float dk = sqrt(11);
float dk = sqrt(11);
#extension GL_ARB_shader_bit_encoding: enable
float f;
vec4 v4;
ivec4 iv4a;
uvec2 uv2c;
void bitEncodingPass()
{
int i = floatBitsToInt(f);
uvec4 uv11 = floatBitsToUint(v4);
vec4 v14 = intBitsToFloat(iv4a);
vec2 v15 = uintBitsToFloat(uv2c);
}
#extension GL_ARB_shader_bit_encoding: disable
void bitEncodingFail()
{
int i = floatBitsToInt(f); // Error, extention GL_ARB_bit_encoding is diabled
}