} else {
/* Upload a new binding table. */
if (INTEL_DEBUG & DEBUG_SHADER_TIME) {
- brw->vtbl.create_raw_surface(
- brw, brw->shader_time.bo, 0, brw->shader_time.bo->size,
- &stage_state->surf_offset[prog_data->binding_table.shader_time_start], true);
+ brw->vtbl.emit_buffer_surface_state(
+ brw, &stage_state->surf_offset[
+ prog_data->binding_table.shader_time_start],
+ brw->shader_time.bo, 0, BRW_SURFACEFORMAT_RAW,
+ brw->shader_time.bo->size, 1, true);
}
uint32_t *bind = brw_state_batch(brw, AUB_TRACE_BINDING_TABLE,
bool layered,
unsigned unit);
- void (*create_raw_surface)(struct brw_context *brw,
- drm_intel_bo *bo,
- uint32_t offset,
- uint32_t size,
- uint32_t *out_offset,
- bool rw);
void (*emit_buffer_surface_state)(struct brw_context *brw,
uint32_t *out_offset,
drm_intel_bo *bo,
drm_intel_bo *bo = intel_bufferobj_buffer(
brw, intel_bo, binding->Offset, intel_bo->Base.Size - binding->Offset);
- brw->vtbl.create_raw_surface(brw, bo, binding->Offset,
- bo->size - binding->Offset,
- &surf_offsets[i], true);
+ brw->vtbl.emit_buffer_surface_state(brw, &surf_offsets[i], bo,
+ binding->Offset, BRW_SURFACEFORMAT_RAW,
+ bo->size - binding->Offset, 1, true);
}
if (prog->NumAtomicBuffers)
gen7_check_surface_setup(surf, false /* is_render_target */);
}
-/**
- * Create a raw surface for untyped R/W access.
- */
-static void
-gen7_create_raw_surface(struct brw_context *brw, drm_intel_bo *bo,
- uint32_t offset, uint32_t size,
- uint32_t *out_offset, bool rw)
-{
- gen7_emit_buffer_surface_state(brw,
- out_offset,
- bo,
- offset,
- BRW_SURFACEFORMAT_RAW,
- size,
- 1,
- true /* rw */);
-}
-
/**
* Creates a null surface.
*
brw->vtbl.update_texture_surface = gen7_update_texture_surface;
brw->vtbl.update_renderbuffer_surface = gen7_update_renderbuffer_surface;
brw->vtbl.emit_null_surface_state = gen7_emit_null_surface_state;
- brw->vtbl.create_raw_surface = gen7_create_raw_surface;
brw->vtbl.emit_buffer_surface_state = gen7_emit_buffer_surface_state;
}
I915_GEM_DOMAIN_SAMPLER, 0);
}
-static void
-gen8_create_raw_surface(struct brw_context *brw, drm_intel_bo *bo,
- uint32_t offset, uint32_t size,
- uint32_t *out_offset, bool rw)
-{
- gen8_emit_buffer_surface_state(brw,
- out_offset,
- bo,
- offset,
- BRW_SURFACEFORMAT_RAW,
- size,
- 1,
- true /* rw */);
-}
-
/**
* Creates a null surface.
*
brw->vtbl.update_texture_surface = gen8_update_texture_surface;
brw->vtbl.update_renderbuffer_surface = gen8_update_renderbuffer_surface;
brw->vtbl.emit_null_surface_state = gen8_emit_null_surface_state;
- brw->vtbl.create_raw_surface = gen8_create_raw_surface;
brw->vtbl.emit_buffer_surface_state = gen8_emit_buffer_surface_state;
}