[Mesa-dev] [PATCH] i965: don't copy VS attribute work arounds for HSW+

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 6 02:41:02 UTC 2016


These workarounds are not required for HSW and above so stop
copying them at VS key generation which is called at draw time.
---
 src/mesa/drivers/dri/i965/brw_vs.c | 6 ++++--
 1 file 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 280e625..8f3c7eb 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -350,8 +350,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
-- 
2.7.4



More information about the mesa-dev mailing list