i965: Skip the register write check on Broadwell.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 4 Nov 2013 22:09:07 +0000 (14:09 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Dec 2013 21:26:03 +0000 (13:26 -0800)
MI_STORE_REGISTER_MEM has to take a 48-bit address, so the existing code
doesn't work.  But supposedly Broadwell has a register whitelist and
just works out of the box anyway, so there's no need to check.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/intel_extensions.c

index ab27d43ca8388be3c688c92ab285e60fffdbf34d..2d5b6c6461455a20d68e3d9657aba64e3f19b30c 100644 (file)
 static bool
 can_do_pipelined_register_writes(struct brw_context *brw)
 {
+   /* Supposedly, Broadwell just works. */
+   if (brw->gen >= 8)
+      return true;
+
    /* We use SO_WRITE_OFFSET0 since you're supposed to write it (unlike the
     * statistics registers), and we already reset it to zero before using it.
     */
@@ -50,7 +54,7 @@ can_do_pipelined_register_writes(struct brw_context *brw)
    const int offset = 100;
 
    /* The register we picked only exists on Gen7+. */
-   assert(brw->gen >= 7);
+   assert(brw->gen == 7);
 
    uint32_t *data;
    /* Set a value in a BO to a known quantity.  The workaround BO already