diff options
author | Marek Olšák <[email protected]> | 2014-04-14 15:25:43 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-04-17 13:54:18 +0200 |
commit | b0fca0a37859bb9ba51d2a1ec2f3c442d8780fe3 (patch) | |
tree | 37f425aa6cd1581cc1e2b80c6db1911ef3eb5b4c /src/gallium/winsys/radeon | |
parent | 3384a41aa9fae6f36205360ac846b1e2ea615cfd (diff) |
winsys/radeon: remove local variable reloc from radeon_get_reloc
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 45920e82d0e..549a87c349d 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -201,19 +201,16 @@ static INLINE void update_reloc(struct drm_radeon_cs_reloc *reloc, int radeon_get_reloc(struct radeon_cs_context *csc, struct radeon_bo *bo) { - struct drm_radeon_cs_reloc *reloc = NULL; unsigned hash = bo->handle & (sizeof(csc->is_handle_added)-1); int i = -1; if (csc->is_handle_added[hash]) { i = csc->reloc_indices_hashlist[hash]; - reloc = &csc->relocs[i]; - if (reloc->handle != bo->handle) { + if (csc->relocs_bo[i] != bo) { /* Hash collision, look for the BO in the list of relocs linearly. */ for (i = csc->crelocs - 1; i >= 0; i--) { - reloc = &csc->relocs[i]; - if (reloc->handle == bo->handle) { + if (csc->relocs_bo[i] == bo) { /* Put this reloc in the hash list. * This will prevent additional hash collisions if there are * several consecutive get_reloc calls for the same buffer. |