mesa/src
Kenneth Graunke df06745c5a i965: Allocate just enough space for user clip planes in uniform arrays.
Previously, we allocated space in brw_vs_prog_data's params and
pull_params arrays for MAX_CLIP_PLANES vec4s---even when it wasn't
necessary.

On a 64-bit architecture, this used 0.5 kB of space (8 clip planes *
4 floats per plane * 8 bytes per float pointer * 2 arrays of pointers =
512 bytes).  Since this cost was per-vertex shader, it added up.

Conveniently, we already store the number of clip plane constants in the
program key.  By using that, we can allocate the exact amount of space
needed.  For the common case where user clipping is disabled, this means
0 bytes.

While we're here, mention exactly what code requires this extra space,
since it wasn't obvious.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-08-28 14:12:48 -07:00
..
egl gbm: Link to libwayland-drm if Wayland EGL platform is enabled 2013-08-12 15:16:22 -07:00
gallium r300g: enable MSAA on r300-r400, be careful about using color compression 2013-08-27 23:18:54 +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 built-ins from ARB_shader_bit_encoding to ARB_gpu_shader5. 2013-08-27 15:06:16 -07:00
glx glx: Generate GLXBadDrawable when drawable is zero 2013-08-13 17:53:33 -07:00
gtest gtest: Build it only for 'make check'. 2013-01-13 12:38:44 +01:00
mapi glapi/gen: build temporary files in the build directory 2013-08-21 18:34:59 +02:00
mesa i965: Allocate just enough space for user clip planes in uniform arrays. 2013-08-28 14:12:48 -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