gallium/radeon: move r600_common_context::texture_buffers to r600g
authorMarek Olšák <marek.olsak@amd.com>
Sun, 2 Oct 2016 14:12:47 +0000 (16:12 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 4 Oct 2016 14:12:03 +0000 (16:12 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h
src/gallium/drivers/r600/r600_state_common.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h

index d137514326bf11b551dfde8ddd40d2a3f6415f69..58d98a90550a4b18c4e6e08240e5d0bc9087281f 100644 (file)
@@ -648,7 +648,7 @@ texture_buffer_sampler_view(struct r600_context *rctx,
        view->tex_resource_words[7] = S_03001C_TYPE(V_03001C_SQ_TEX_VTX_VALID_BUFFER);
 
        if (tmp->resource.gpu_address)
-               LIST_ADDTAIL(&view->list, &rctx->b.texture_buffers);
+               LIST_ADDTAIL(&view->list, &rctx->texture_buffers);
        return &view->base;
 }
 
index 635b76fd380a853593b9c4939b1a95708c065b60..a3500804d8d5c9a3f2de3786c0cca0ecfdcb6629 100644 (file)
@@ -133,6 +133,7 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen,
                goto fail;
 
        rctx->screen = rscreen;
+       LIST_INITHEAD(&rctx->texture_buffers);
 
        r600_init_blit_functions(rctx);
 
index 4403aca687a238f7c0efe3e0e52da35ae8d09992..cf8eba38fe223a66acbb55986e1a8cb7a297aed0 100644 (file)
@@ -501,6 +501,11 @@ struct r600_context {
        unsigned                        zwritemask;
        int                                     ps_iter_samples;
 
+       /* The list of all texture buffer objects in this context.
+        * This list is walked when a buffer is invalidated/reallocated and
+        * the GPU addresses are updated. */
+       struct list_head                texture_buffers;
+
        /* Index buffer. */
        struct pipe_index_buffer        index_buffer;
 
index bb994297c112712265278b32305042205fc57bed..48c544329569af92d2306a634c130269013bf136 100644 (file)
@@ -2829,7 +2829,7 @@ static void r600_invalidate_buffer(struct pipe_context *ctx, struct pipe_resourc
        }
 
        /* Texture buffer objects - update the virtual addresses in descriptors. */
-       LIST_FOR_EACH_ENTRY(view, &rctx->b.texture_buffers, list) {
+       LIST_FOR_EACH_ENTRY(view, &rctx->texture_buffers, list) {
                if (view->base.texture == &rbuffer->b.b) {
                        uint64_t offset = view->base.u.buf.offset;
                        uint64_t va = rbuffer->gpu_address + offset;
index 0f156dfd4a8f7aa1e9aadfe50a0b0ff79d53051e..ae495b43e1711fac432fe76e8f0195d929e0105f 100644 (file)
@@ -528,8 +528,6 @@ bool r600_common_context_init(struct r600_common_context *rctx,
                                              RADEON_GPU_RESET_COUNTER);
        }
 
-       LIST_INITHEAD(&rctx->texture_buffers);
-
        r600_init_context_texture_functions(rctx);
        r600_init_viewport_functions(rctx);
        r600_streamout_init(rctx);
index cea1f22c259fe2542541a2cb7b7683ba290c2c75..1614ed229434c41894c559acf6ebbe9581009d8d 100644 (file)
@@ -615,11 +615,6 @@ struct r600_common_context {
                bool                            query_active;
        } dcc_stats[5];
 
-       /* The list of all texture buffer objects in this context.
-        * This list is walked when a buffer is invalidated/reallocated and
-        * the GPU addresses are updated. */
-       struct list_head                texture_buffers;
-
        struct pipe_debug_callback      debug;
 
        void                            *query_result_shader;