mesa/src
Matt Turner d56bbd0441 glsl: Add frexp signatures and implementation.
I initially implemented frexp() as an IR opcode with a lowering pass,
but since it returns a value and has an out-parameter, it would break
assumptions our optimization passes make about ir_expressions being pure
(i.e., having no side effects).

For example, if opt_tree_grafting encounters this code:

uniform float u;
void main()
{
  int exp;
  float f = frexp(u, out exp);
  float g = float(exp)/256.0;
  float h = float(exp) + 1.0;
  gl_FragColor = vec4(f, g, h, g + h);
}

it may try to optimize it to this:

uniform float u;
void main()
{
  int exp;
  float g = float(exp)/256.0;
  float h = float(exp) + 1.0;
  gl_FragColor = vec4(frexp(u, out exp), g, h, g + h);
}

Some hardware has an instruction which performs frexp(), but we would
need some other compiler infrastructure to be able to generate it, such
as an intrinsics system that would allow backends to emit specific code
for particular bits of IR.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-09-17 17:01:58 -07:00
..
egl wayland-egl.pc requires wayland-client.pc. 2013-09-11 10:51:02 -07:00
gallium gallivm: some bits of seamless cube filtering implementation 2013-09-18 00:00:37 +02:00
gbm gbm: Link to libwayland-drm if Wayland EGL platform is enabled 2013-08-12 15:16:22 -07:00
getopt
glsl glsl: Add frexp signatures and implementation. 2013-09-17 17:01:58 -07:00
glx glx: Initialize OpenGL version to 1.0 2013-09-04 16:07:21 -07:00
gtest gtest: Build it only for 'make check'. 2013-01-13 12:38:44 +01:00
mapi glapi: Setup autogeneration infrastructure for KHR_debug 2013-09-04 07:47:49 -06:00
mesa i965: Lower ldexp. 2013-09-17 16:59:26 -07:00
Makefile.am gbm: Link to libwayland-drm if Wayland EGL platform is enabled 2013-08-12 15:16:22 -07:00
SConscript Remove libGLU 2012-08-31 10:58:15 -07:00