r600g: remove radeon_bo::handle
authorMarek Olšák <maraeo@gmail.com>
Thu, 4 Aug 2011 03:40:16 +0000 (05:40 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 16 Aug 2011 07:15:11 +0000 (09:15 +0200)
This should be private to radeon_winsys.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/winsys/r600/drm/r600_hw_context.c
src/gallium/winsys/r600/drm/r600_priv.h
src/gallium/winsys/r600/drm/radeon_bo.c
src/gallium/winsys/radeon/drm/radeon_drm_bo.c
src/gallium/winsys/radeon/drm/radeon_winsys.h

index 0ebb5ed0385d59bf9f72433f3d42ff04e8391128..b2da3eb0458381842f96c9ef4f0b7e237b3730ee 100644 (file)
@@ -1130,11 +1130,11 @@ void r600_context_pipe_state_set_resource(struct r600_context *ctx, struct r600_
 
        if (!dirty) {
                if (is_vertex) {
-                       if (block->reloc[1].bo->bo->handle != state->bo[0]->bo->handle)
+                       if (block->reloc[1].bo->bo->buf != state->bo[0]->bo->buf)
                                dirty |= R600_BLOCK_STATUS_RESOURCE_DIRTY;
                } else {
-                       if ((block->reloc[1].bo->bo->handle != state->bo[0]->bo->handle) ||
-                           (block->reloc[2].bo->bo->handle != state->bo[1]->bo->handle))
+                       if ((block->reloc[1].bo->bo->buf != state->bo[0]->bo->buf) ||
+                           (block->reloc[2].bo->bo->buf != state->bo[1]->bo->buf))
                                dirty |= R600_BLOCK_STATUS_RESOURCE_DIRTY;
                }
        }
index 90860f4e31bcc2ecf31b1c1a7aff2301b1f806d6..1f311c4d5e3e0c75a321dfd3aa8a41cd7557fc73 100644 (file)
@@ -64,7 +64,6 @@ struct radeon_bo {
        struct pipe_reference           reference;
        struct pb_buffer                *buf;
        struct radeon_winsys_cs_handle  *cs_buf;
-       unsigned                        handle;
        unsigned                        size;
 
        unsigned                        last_flush;
index 14f8d340d67cfe1f5560bb79713531cbd269239b..1d3766e55b57b275c6aa6458d6acec7cc509d7bc 100644 (file)
@@ -58,7 +58,6 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle,
                return NULL;
        }
        bo->cs_buf = radeon->ws->buffer_get_cs_handle(bo->buf);
-       bo->handle = radeon->ws->trans_get_buffer_handle(bo->buf);
        bo->size = size;
        return bo;
 }
index 58898d3423ed425f51a79b527f4e3e05ac96a937..609a9065db8decaf01502b800a6a7536acc57c63 100644 (file)
@@ -617,11 +617,6 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
     return TRUE;
 }
 
-static unsigned trans_get_buffer_handle(struct pb_buffer *buf)
-{
-       return get_radeon_bo(buf)->handle;
-}
-
 void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
 {
     ws->base.buffer_get_cs_handle = radeon_drm_get_cs_handle;
@@ -634,6 +629,4 @@ void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
     ws->base.buffer_create = radeon_winsys_bo_create;
     ws->base.buffer_from_handle = radeon_winsys_bo_from_handle;
     ws->base.buffer_get_handle = radeon_winsys_bo_get_handle;
-
-    ws->base.trans_get_buffer_handle = trans_get_buffer_handle;
 }
index 47274055207c0ae40e3cecaa30863723134ab019..9f70c5c2f9fd59cc4c61c46f73bd97df0ddeb01f 100644 (file)
@@ -329,10 +329,6 @@ struct radeon_winsys {
     boolean (*cs_request_feature)(struct radeon_winsys_cs *cs,
                                   enum radeon_feature_id fid,
                                   boolean enable);
-
-
-    /* Transitional functions for r600g when moving to winsys/radeon */
-    unsigned (*trans_get_buffer_handle)(struct pb_buffer *buf);
 };
 
 #endif