struct dri_ttm_reloc {
dri_bo *target_buf;
uint64_t validate_flags;
- unsigned int pre_target_buf_handle;
};
typedef struct _dri_bo_ttm {
*/
static void
intel_add_validate_buffer(dri_bo *buf,
- uint64_t flags, GLboolean presumed)
+ uint64_t flags)
{
dri_bufmgr_ttm *bufmgr_ttm = (dri_bufmgr_ttm *)buf->bufmgr;
dri_bo_ttm *ttm_buf = (dri_bo_ttm *)buf;
req->bo_req.flags = flags;
req->bo_req.hint = 0;
#ifdef DRM_BO_HINT_PRESUMED_OFFSET
- if (presumed)
- req->bo_req.hint |= DRM_BO_HINT_PRESUMED_OFFSET;
-
+ req->bo_req.hint |= DRM_BO_HINT_PRESUMED_OFFSET;
req->bo_req.presumed_offset = buf->offset;
#endif
req->bo_req.mask = INTEL_BO_MASK;
bo_ttm->relocs = malloc(sizeof(struct dri_ttm_reloc) *
bufmgr_ttm->max_relocs);
- memset(bo_ttm->relocs, 0, sizeof(struct dri_ttm_reloc) * bufmgr_ttm->max_relocs);
if (bufmgr_ttm->cached_reloc_buf_data != NULL) {
bo_ttm->reloc_buf_data = bufmgr_ttm->cached_reloc_buf_data;
this_reloc[2] = target_buf_ttm->drm_bo.handle; /* To be filled in at exec time */
this_reloc[3] = 0;
- if (reloc_buf_ttm->relocs[num_relocs].target_buf) {
- dri_bo_ttm *pre_target_buf_ttm = (dri_bo_ttm *)reloc_buf_ttm->relocs[num_relocs].target_buf;
- reloc_buf_ttm->relocs[num_relocs].pre_target_buf_handle = pre_target_buf_ttm->drm_bo.handle;
- }
-
reloc_buf_ttm->relocs[num_relocs].validate_flags = flags;
reloc_buf_ttm->relocs[num_relocs].target_buf = target_buf;
dri_bo_reference(target_buf);
for (i = 0; i < nr_relocs; i++) {
struct dri_ttm_reloc *r = &bo_ttm->relocs[i];
- dri_bo_ttm *target_buf_ttm = (dri_bo_ttm *)r->target_buf;
/* Continue walking the tree depth-first. */
dri_ttm_bo_process_reloc(r->target_buf);
/* Add the target to the validate list */
- intel_add_validate_buffer(r->target_buf, r->validate_flags, r->pre_target_buf_handle == target_buf_ttm->drm_bo.handle);
+ intel_add_validate_buffer(r->target_buf, r->validate_flags);
}
}
* pointing to it.
*/
intel_add_validate_buffer(batch_buf,
- DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_EXE, GL_FALSE);
+ DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_EXE);
*count = bufmgr_ttm->validate_count;
return &bufmgr_ttm->validate_array[0].bo_arg;