#include "blorp_priv.h"
#include "common/gen_device_info.h"
#include "common/gen_sample_positions.h"
+#include "genxml/gen_macros.h"
/**
* This file provides the blorp pipeline setup and execution functionality.
blorp_alloc_vertex_buffer(struct blorp_batch *batch, uint32_t size,
struct blorp_address *addr);
+#if GEN_GEN >= 8
+static struct blorp_address
+blorp_get_workaround_page(struct blorp_batch *batch);
+#endif
+
static void
blorp_alloc_binding_table(struct blorp_batch *batch, unsigned num_entries,
unsigned state_size, unsigned state_alignment,
/***** BEGIN blorp_exec implementation ******/
-#include "genxml/gen_macros.h"
-
static uint64_t
_blorp_combine_address(struct blorp_batch *batch, void *location,
struct blorp_address address, uint32_t delta)
*/
blorp_emit(batch, GENX(PIPE_CONTROL), pc) {
pc.PostSyncOperation = WriteImmediateData;
+ pc.Address = blorp_get_workaround_page(batch);
}
blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp);
return vb_state.map;
}
+#if GEN_GEN >= 8
+static struct blorp_address
+blorp_get_workaround_page(struct blorp_batch *batch)
+{
+ struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
+
+ return (struct blorp_address) {
+ .buffer = &cmd_buffer->device->workaround_bo,
+ };
+}
+#endif
+
static void
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
{
return data;
}
+#if GEN_GEN >= 8
+static struct blorp_address
+blorp_get_workaround_page(struct blorp_batch *batch)
+{
+ assert(batch->blorp->driver_ctx == batch->driver_batch);
+ struct brw_context *brw = batch->driver_batch;
+
+ return (struct blorp_address) {
+ .buffer = brw->workaround_bo,
+ };
+}
+#endif
+
static void
blorp_flush_range(struct blorp_batch *batch, void *start, size_t size)
{