#include "iris_resource.h"
#include "iris_context.h"
+#include "util/u_upload_mgr.h"
#include "intel/common/gen_l3_config.h"
+
+#define BLORP_USE_SOFTPIN
#include "blorp/blorp_genX_exec.h"
-#include "util/u_upload_mgr.h"
static uint32_t *
stream_state(struct iris_batch *batch,
unsigned size,
unsigned alignment,
uint32_t *out_offset,
- struct iris_bo **out_bo,
- bool relative_to_base)
+ struct iris_bo **out_bo)
{
struct pipe_resource *res = NULL;
void *ptr = NULL;
struct iris_bo *bo = iris_resource_bo(res);
iris_use_pinned_bo(batch, bo, false);
- *out_bo = bo;
- *out_offset += relative_to_base ? iris_bo_offset_from_base_address(bo)
- : bo->gtt_offset;
+ /* If the caller has asked for a BO, we leave them the responsibility of
+ * adding bo->gtt_offset (say, by handing an address to genxml). If not,
+ * we assume they want the offset from a base address.
+ */
+ if (out_bo)
+ *out_bo = bo;
+ else
+ *out_offset += iris_bo_offset_from_base_address(bo);
pipe_resource_reference(&res, NULL);
{
struct iris_context *ice = blorp_batch->blorp->driver_ctx;
struct iris_batch *batch = blorp_batch->driver_batch;
- struct iris_bo *bo;
return stream_state(batch, ice->state.dynamic_uploader,
- size, alignment, offset, &bo, true);
+ size, alignment, offset, NULL);
}
static void
{
struct iris_context *ice = blorp_batch->blorp->driver_ctx;
struct iris_batch *batch = blorp_batch->driver_batch;
- struct iris_bo *bo;
uint32_t *bt_map = iris_binder_reserve(&ice->state.binder,
num_entries * sizeof(uint32_t),
for (unsigned i = 0; i < num_entries; i++) {
surface_maps[i] = stream_state(batch, ice->state.surface_uploader,
state_size, state_alignment,
- &surface_offsets[i], &bo, true);
+ &surface_offsets[i], NULL);
bt_map[i] = surface_offsets[i];
}
}
uint32_t offset;
void *map = stream_state(batch, ice->ctx.stream_uploader, size, 64,
- &offset, &bo, false);
+ &offset, &bo);
*addr = (struct blorp_address) {
.buffer = bo,