summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2016-11-28 16:16:48 -0800
committerKristian H. Kristensen <[email protected]>2016-11-29 22:02:49 -0800
commit908febcf214f0db8ec29f559644a2c26007235e9 (patch)
tree5a043d726dbbd87ca4e3a68bd15a15df1647367d /src/intel/vulkan
parentbe9c2ab23b6a89b971100fc10359ddf7fe8ff849 (diff)
anv: Don't include two different pack headers
The batch chain logic only needs the pre-gen8 size of MI_BATCH_BUFFER_START, which seems like something we can make a special case for. The other two gen7 references, MI_BATCH_BUFFER_END and MI_NOOP, are the same on all gens. Signed-off-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_batch_chain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index cca8867b0cd..f5859460664 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -29,7 +29,6 @@
#include "anv_private.h"
-#include "genxml/gen7_pack.h"
#include "genxml/gen8_pack.h"
#include "util/debug.h"
@@ -449,6 +448,9 @@ emit_batch_buffer_start(struct anv_cmd_buffer *cmd_buffer,
* gens.
*/
+#define GEN7_MI_BATCH_BUFFER_START_length 2
+#define GEN7_MI_BATCH_BUFFER_START_length_bias 2
+
const uint32_t gen7_length =
GEN7_MI_BATCH_BUFFER_START_length - GEN7_MI_BATCH_BUFFER_START_length_bias;
const uint32_t gen8_length =
@@ -779,11 +781,11 @@ anv_cmd_buffer_end_batch_buffer(struct anv_cmd_buffer *cmd_buffer)
cmd_buffer->batch.end += GEN8_MI_BATCH_BUFFER_START_length * 4;
assert(cmd_buffer->batch.end == batch_bo->bo.map + batch_bo->bo.size);
- anv_batch_emit(&cmd_buffer->batch, GEN7_MI_BATCH_BUFFER_END, bbe);
+ anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_END, bbe);
/* Round batch up to an even number of dwords. */
if ((cmd_buffer->batch.next - cmd_buffer->batch.start) & 4)
- anv_batch_emit(&cmd_buffer->batch, GEN7_MI_NOOP, noop);
+ anv_batch_emit(&cmd_buffer->batch, GEN8_MI_NOOP, noop);
cmd_buffer->exec_mode = ANV_CMD_BUFFER_EXEC_MODE_PRIMARY;
}