i965: don't copy VS attribute work arounds for HSW+
authorTimothy Arceri <timothy.arceri@collabora.com>
Wed, 6 Jul 2016 02:41:02 +0000 (12:41 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 7 Jul 2016 02:29:12 +0000 (12:29 +1000)
These workarounds are not required for HSW and above so stop
copying them at VS key generation which is called at draw time.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vs.c

index 877bcb59e47cdc003e3dbc58927e419df3361337..cda95f81f1b2bf940534d79810d9a7a4dff9016b 100644 (file)
@@ -348,8 +348,10 @@ brw_vs_populate_key(struct brw_context *brw,
    brw_populate_sampler_prog_key_data(ctx, prog, &key->tex);
 
    /* BRW_NEW_VS_ATTRIB_WORKAROUNDS */
-   memcpy(key->gl_attrib_wa_flags, brw->vb.attrib_wa_flags,
-          sizeof(brw->vb.attrib_wa_flags));
+   if (brw->gen < 8 && !brw->is_haswell) {
+      memcpy(key->gl_attrib_wa_flags, brw->vb.attrib_wa_flags,
+             sizeof(brw->vb.attrib_wa_flags));
+   }
 }
 
 void