diff options
author | Kenneth Graunke <[email protected]> | 2013-08-25 21:38:29 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-08-28 14:12:48 -0700 |
commit | df06745c5adb524e15d157f976c08f1718f08efa (patch) | |
tree | 497a20b0b9367e4baeed7546cfabe5225253491d /bin | |
parent | 72b3c6c96f971fbaf438289e5e89ccf324a49ca7 (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions