aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.c
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-09-27 12:33:28 -0700
committerPaul Berry <[email protected]>2011-10-06 19:29:07 -0700
commit18e2e19b07b312c978dfbb6d336f69fa84b3ffe2 (patch)
treea3d3e6026db55557c29da31d19fa6a47185a324e /src/mesa/drivers/dri/i965/brw_vs.c
parent8f6920a7b69bd20f04f807e88c22cf1eb78b4e79 (diff)
i965: Make brw_compute_vue_map's userclip dependency a boolean.
Previously, brw_compute_vue_map required an argument indicating the number of clip planes in use, but all it did with it was check if it was nonzero. This patch changes brw_compute_vue_map to take a boolean instead. This allows us to avoid some unnecessary recompilation of the Gen4/5 GS and SF threads. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index eb673e29c96..e01752cdb71 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -55,7 +55,8 @@ static inline void assign_vue_slot(struct brw_vue_map *vue_map,
*/
void
brw_compute_vue_map(struct brw_vue_map *vue_map,
- const struct intel_context *intel, int nr_userclip,
+ const struct intel_context *intel,
+ bool userclip_active,
GLbitfield64 outputs_written)
{
int i;
@@ -112,7 +113,7 @@ brw_compute_vue_map(struct brw_vue_map *vue_map,
*/
assign_vue_slot(vue_map, VERT_RESULT_PSIZ);
assign_vue_slot(vue_map, VERT_RESULT_HPOS);
- if (nr_userclip) {
+ if (userclip_active) {
assign_vue_slot(vue_map, VERT_RESULT_CLIP_DIST0);
assign_vue_slot(vue_map, VERT_RESULT_CLIP_DIST1);
}
@@ -287,6 +288,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
* the inputs it asks for, whether they are varying or not.
*/
key.program_string_id = vp->id;
+ key.userclip_active = (ctx->Transform.ClipPlanesEnabled != 0);
key.nr_userclip = _mesa_bitcount_64(ctx->Transform.ClipPlanesEnabled);
key.uses_clip_distance = vp->program.UsesClipDistance;
if (!key.uses_clip_distance)