iris: fix constant buffer 0 to be absolute
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 7 Sep 2018 19:26:55 +0000 (12:26 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:08 +0000 (10:26 -0800)
thanks to Jason for catching this.  Fixes some va64 tests.  Surprisingly
not much else, as apparently getting to UBO range 4 is uncommon!

src/gallium/drivers/iris/iris_state.c

index cfdd69bdde26768e9bb7566fcfb748c2c9f55fdf..5472ff57fcadcfa054e59dbc3c8c9a9e13c6b53d 100644 (file)
@@ -498,6 +498,17 @@ iris_init_render_context(struct iris_screen *screen,
       sba.DynamicStateBufferSize   = 0xfffff;
    }
 
+   // XXX: INSTPM on Gen8
+   uint32_t reg_val;
+   iris_pack_state(GENX(CS_DEBUG_MODE2), &reg_val, reg) {
+      reg.CONSTANT_BUFFERAddressOffsetDisable = true;
+      reg.CONSTANT_BUFFERAddressOffsetDisableMask = true;
+   }
+   iris_emit_cmd(batch, GENX(MI_LOAD_REGISTER_IMM), lri) {
+      lri.RegisterOffset = GENX(CS_DEBUG_MODE2_num);
+      lri.DataDWord      = reg_val;
+   }
+
    /* 3DSTATE_DRAWING_RECTANGLE is non-pipelined, so we want to avoid
     * changing it dynamically.  We set it to the maximum size here, and
     * instead include the render target dimensions in the viewport, so