mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
Add check for DOUBLE in low versions (#2223)
Add check for DOUBLE in low versions, fix issue #2206
This commit is contained in:
parent
7c753a7253
commit
0ab78114a9
@ -149,3 +149,7 @@ layout(location=6) uniform ColorsBuffer // ERROR: location cannot be applied in
|
||||
} colorsBuffer;
|
||||
|
||||
|
||||
void testOverload() {
|
||||
float overloadTest = 42;
|
||||
overloadTest = smoothstep(0, 1, overloadTest);
|
||||
}
|
@ -83,6 +83,22 @@ ERROR: node is still EOpNull!
|
||||
0:135 'KeyMem' ( global structure{ global int precise})
|
||||
0:135 Constant:
|
||||
0:135 0 (const int)
|
||||
0:152 Function Definition: testOverload( ( global void)
|
||||
0:152 Function Parameters:
|
||||
0:153 Sequence
|
||||
0:153 Sequence
|
||||
0:153 move second child to first child ( temp float)
|
||||
0:153 'overloadTest' ( temp float)
|
||||
0:153 Constant:
|
||||
0:153 42.000000
|
||||
0:154 move second child to first child ( temp float)
|
||||
0:154 'overloadTest' ( temp float)
|
||||
0:154 smoothstep ( global float)
|
||||
0:154 Constant:
|
||||
0:154 0.000000
|
||||
0:154 Constant:
|
||||
0:154 1.000000
|
||||
0:154 'overloadTest' ( temp float)
|
||||
0:? Linker Objects
|
||||
0:? 'inVar' ( smooth in 4-component vector of float)
|
||||
0:? 'outVar' (layout( location=0 index=0) out 4-component vector of float)
|
||||
|
@ -1733,12 +1733,14 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
|
||||
case EbtUint64:
|
||||
case EbtFloat:
|
||||
case EbtDouble:
|
||||
return true;
|
||||
return version >= 400 || extensionRequested(E_GL_ARB_gpu_shader_fp64);
|
||||
case EbtInt16:
|
||||
case EbtUint16:
|
||||
return extensionRequested(E_GL_AMD_gpu_shader_int16);
|
||||
return (version >= 400 || extensionRequested(E_GL_ARB_gpu_shader_fp64)) &&
|
||||
extensionRequested(E_GL_AMD_gpu_shader_int16);
|
||||
case EbtFloat16:
|
||||
return extensionRequested(E_GL_AMD_gpu_shader_half_float);
|
||||
return (version >= 400 || extensionRequested(E_GL_ARB_gpu_shader_fp64)) &&
|
||||
extensionRequested(E_GL_AMD_gpu_shader_half_float);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user