intel: decoder: unify MI_BB_START field naming
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 14 Aug 2018 10:22:12 +0000 (11:22 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 24 Aug 2018 22:10:08 +0000 (23:10 +0100)
The batch decoder looks for a field with a particular name to decide
whether an MI_BB_START leads into a second batch buffer level. Because
the names are different between Gen7.5/8 and the newer generation we
fail that test and keep on reading (invalid) instructions.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107544
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/genxml/gen75.xml
src/intel/genxml/gen8.xml
src/intel/vulkan/anv_batch_chain.c

index 5b01fd45400159d91b0fc6889ac5ecb95fa6060e..dfc3d8914982ae0bb5c84b8f1f279ea018e35d23 100644 (file)
   <instruction name="MI_BATCH_BUFFER_START" bias="2" length="2">
     <field name="Command Type" start="29" end="31" type="uint" default="0"/>
     <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/>
-    <field name="2nd Level Batch Buffer" start="22" end="22" type="uint">
-      <value name="1st level batch" value="0"/>
-      <value name="2nd level batch" value="1"/>
+    <field name="Second Level Batch Buffer" start="22" end="22" type="uint">
+      <value name="First level batch" value="0"/>
+      <value name="Second level batch" value="1"/>
     </field>
     <field name="Add Offset Enable" start="16" end="16" type="bool"/>
     <field name="Predication Enable" start="15" end="15" type="bool"/>
index 4ed41d15612a880b7a2c81e3297337e50431d602..330366b7ed083ac18f5fb316d387f31707877fdf 100644 (file)
   <instruction name="MI_BATCH_BUFFER_START" bias="2" length="3">
     <field name="Command Type" start="29" end="31" type="uint" default="0"/>
     <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/>
-    <field name="2nd Level Batch Buffer" start="22" end="22" type="uint">
-      <value name="1st level batch" value="0"/>
-      <value name="2nd level batch" value="1"/>
+    <field name="Second Level Batch Buffer" start="22" end="22" type="uint">
+      <value name="First level batch" value="0"/>
+      <value name="Second level batch" value="1"/>
     </field>
     <field name="Add Offset Enable" start="16" end="16" type="bool"/>
     <field name="Predication Enable" start="15" end="15" type="bool"/>
index c47a81c8a4df1baf4644c6a0787f1fb49921c5a0..0f7c8325ea4085f46ae70bbadb303146941decfe 100644 (file)
@@ -531,7 +531,7 @@ emit_batch_buffer_start(struct anv_cmd_buffer *cmd_buffer,
    anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_START, bbs) {
       bbs.DWordLength               = cmd_buffer->device->info.gen < 8 ?
                                       gen7_length : gen8_length;
-      bbs._2ndLevelBatchBuffer      = _1stlevelbatch;
+      bbs.SecondLevelBatchBuffer    = Firstlevelbatch;
       bbs.AddressSpaceIndicator     = ASI_PPGTT;
       bbs.BatchBufferStartAddress   = (struct anv_address) { bo, offset };
    }