gallium: add pipe cap for scissored clears and pass scissor state to clear() hook
[mesa.git] / src / gallium / drivers / r600 / compute_memory_pool.c
index 981d944b8d0a1fcb8227d25bc763ae328290639b..685c2b6d21be23ad1e13856d36ce2ba562b89368 100644 (file)
@@ -114,7 +114,7 @@ void compute_memory_pool_delete(struct compute_memory_pool* pool)
 {
        COMPUTE_DBG(pool->screen, "* compute_memory_pool_delete()\n");
        free(pool->shadow);
-       pipe_resource_reference(&pool->bo, NULL);
+       r600_resource_reference(&pool->bo, NULL);
        /* In theory, all of the items were freed in compute_memory_free.
         * Just delete the list heads
         */
@@ -157,7 +157,7 @@ static int compute_memory_grow_defrag_pool(struct compute_memory_pool *pool,
                        compute_memory_defrag(pool, src, dst, pipe);
 
                        /* Release the old buffer */
-                       pipe_resource_reference(&pool->bo, NULL);
+                       r600_resource_reference(&pool->bo, NULL);
                        pool->bo = temp;
                        pool->size_in_dw = new_size_in_dw;
                }
@@ -172,7 +172,7 @@ static int compute_memory_grow_defrag_pool(struct compute_memory_pool *pool,
 
                        pool->size_in_dw = new_size_in_dw;
                        /* Release the old buffer */
-                       pipe_resource_reference(&pool->bo, NULL);
+                       r600_resource_reference(&pool->bo, NULL);
                        pool->bo = r600_compute_buffer_alloc_vram(pool->screen, pool->size_in_dw * 4);
                        compute_memory_shadow(pool, pipe, 0);
 
@@ -429,14 +429,13 @@ static void compute_memory_move_item(struct compute_memory_pool *pool,
        struct r600_context *rctx = (struct r600_context *)pipe;
        struct pipe_box box;
 
-       MAYBE_UNUSED struct compute_memory_item *prev;
-
        COMPUTE_DBG(pool->screen, "* compute_memory_move_item()\n"
                        "  + Moving item %"PRIi64" from %"PRIi64" (%"PRIi64" bytes) to %"PRIu64" (%"PRIu64" bytes)\n",
                        item->id, item->start_in_dw, item->start_in_dw * 4,
                        new_start_in_dw, new_start_in_dw * 4);
 
        if (pool->item_list != item->link.prev) {
+               ASSERTED struct compute_memory_item *prev;
                prev = container_of(item->link.prev, item, link);
                assert(prev->start_in_dw + prev->size_in_dw <= new_start_in_dw);
        }