The shader code is preprocessed with glslang that doesn't use the driver
capabilities to define macros indicating the availability of extensions,
instead it uses its own set of supported extensions, and in this case
it supports ARB_gpu_shader5. As a result the generated shader code would
make use of the (u)intBitsToFloat conversion functions based on the define
GL_ARB_gpu_shader5 also if the driver doesn't support this extension.
Hence an additional define is added to indicate whether bit casting
functions are available, and the extension is only enabled/required when
the driver actually supports it.
Closes: #1586
v2: - Fix ws
- reword commit message
v3: - check for ARB_shader_bit_encoding and ARB_gpu_shader5 in shader creation code
- don't enable GL_ARB_gpu_shader5 unconditionally in the OpenGL shader
- reword commit message
v4: Use an additional define HAS_BIT_CONVERSION to make sure gslang correctly
parses the shader code (Baldurk).
v6: - Add HAS_BIT_CONVERSION also with the GLES code path (Baldur)
- split patch
- reword commit message(s) (Baldur)
v7: fix ws
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
lala