i965/eu: Update jump distance scaling for Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 3 Jul 2014 22:01:58 +0000 (15:01 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Aug 2014 02:32:34 +0000 (19:32 -0700)
Broadwell measures jump distances in bytes, so we need to scale by 16.

v2: Update the function in brw_eu.h, not in brw_eu_emit.c.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_eu.h

index 3e03ab82cc00dd8ec200f4390f80c134fd0be036..93f03454a27e81f9fb01ed1759fc2c0aafb896d5 100644 (file)
@@ -326,6 +326,10 @@ void brw_shader_time_add(struct brw_compile *p,
 static inline unsigned
 brw_jump_scale(const struct brw_context *brw)
 {
+   /* Broadwell measures jump targets in bytes. */
+   if (brw->gen >= 8)
+      return 16;
+
    /* Ironlake and later measure jump targets in 64-bit data chunks (in order
     * (to support compaction), so each 128-bit instruction requires 2 chunks.
     */