diff options
author | Paul Berry <[email protected]> | 2011-09-23 21:33:50 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-09-28 11:38:03 -0700 |
commit | e7da40afe84349a640fe15e3af408a0dfe880e85 (patch) | |
tree | 9cf7f8a407bb4c4cb77f5c42fe58ad421d6dba06 /src/mesa/drivers/dri/i965/brw_vec4.h | |
parent | 7e2b23ba85a89282565d9375b0a885cc48e66c82 (diff) |
i965 new VS: don't share clip plane constants in pre-GEN6
In pre-GEN6, when using clip planes, both the vertex shader and the
clipper need access to the client-supplied clip planes, since the
vertex shader needs them to set the clip flags, and the clipper needs
them to determine where to insert new vertices.
With the old VS backend, we used a clever optimization to avoid
placing duplicate copies of these planes in the CURBE: we used the
same block of memory for both the clipper and vertex shader constants,
with the clip planes at the front of it, and then we instructed the
clipper to read just the initial part of this block containing the
clip planes.
This optimization was tricky, of dubious value, and not completely
working in the new VS backend, so I've removed it. Now, when using
the new VS backend, separate parts of the CURBE are used for the
clipper and the vertex shader. Note that this doesn't affect the
number of push constants available to the vertex shader, it simply
causes the CURBE to occupy a few more bytes of URB memory.
The old VS backend is unaffected. GEN6+, which does clipping entirely
in hardware, is also unaffected.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 876a6917201..b6864c326e9 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -324,6 +324,7 @@ public: int first_non_payload_grf; int *virtual_grf_def; int *virtual_grf_use; + dst_reg userplane[MAX_CLIP_PLANES]; /** * This is the size to be used for an array with an element per @@ -385,6 +386,7 @@ public: void fail(const char *msg, ...); int virtual_grf_alloc(int size); + void setup_uniform_clipplane_values(); int setup_uniform_values(int loc, const glsl_type *type); void setup_builtin_uniform_values(ir_variable *ir); int setup_attributes(int payload_reg); |