diff options
author | Marek Olšák <[email protected]> | 2016-10-02 16:12:47 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-04 16:12:03 +0200 |
commit | 6c0168439348e6ea801258e373693d4aaa4ee44e (patch) | |
tree | 26bc919996dbf5a45e2c39a5f450a3639f372f73 /src/gallium/drivers/r600 | |
parent | 7ce19d90143875367f23240192d438065dc297fa (diff) |
gallium/radeon: move r600_common_context::texture_buffers to r600g
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index d137514326b..58d98a90550 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -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; } diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 635b76fd380..a3500804d8d 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -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); diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 4403aca687a..cf8eba38fe2 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -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; diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index bb994297c11..48c54432956 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -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; |