summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-05-16 11:41:32 -0700
committerKenneth Graunke <[email protected]>2011-05-17 23:32:57 -0700
commitebeea9857339da5f0f0455c45a8350190bbad189 (patch)
tree5ce42d40c830a3ec0dc395f749c24723d7503d36
parentc6175d78705aaca23fc5561a3a73be0b6a952b27 (diff)
i965/gs: Move generation check for bailing earlier.
On Sandybridge, we don't need to break down primitives. There's no need to bother setting up brw_compile and such if it's not going to be used; bail as early as possible. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index f213ae20acd..c6d3a09e06a 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -52,6 +52,12 @@ static void compile_gs_prog( struct brw_context *brw,
const GLuint *program;
GLuint program_size;
+ /* Gen6: VF has already converted into polygon, and LINELOOP is
+ * converted to LINESTRIP at the beginning of the 3D pipeline.
+ */
+ if (intel->gen == 6)
+ return;
+
memset(&c, 0, sizeof(c));
c.key = *key;
@@ -84,12 +90,6 @@ static void compile_gs_prog( struct brw_context *brw,
* already been weeded out by this stage:
*/
- /* Gen6: VF has already converted into polygon, and LINELOOP is
- * converted to LINESTRIP at the beginning of the 3D pipeline.
- */
- if (intel->gen == 6)
- return;
-
switch (key->primitive) {
case GL_QUADS:
brw_gs_quads( &c, key );