diff options
author | Marek Olšák <[email protected]> | 2013-04-21 23:26:52 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-04-23 20:26:20 +0200 |
commit | b69207642079fe8ba33c594750415e8d9c66a06f (patch) | |
tree | f71b6cfd90363297b7f15c0acd55508267fc7a5a /src/gallium/drivers/r600/r600_pipe.h | |
parent | 1ba46bbb4c99caa7e297f2ec6717e962765275cb (diff) |
r600g: initialize CMASK and HTILE with the GPU using streamout
This fixes a crash when a resource cannot be mapped to the CPU's address space
because it's too big.
This puts a global pipe_context in r600_screen, which is guarded by a mutex,
so that we can use pipe_context when there isn't one around.
Hopefully our multi-context support is solid.
Reviewed-by: Alex Deucher <[email protected]>
NOTE: This is a candidate for the 9.1 branch.
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 4a692e78302..1dbed80ae40 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -290,6 +290,11 @@ struct r600_screen { unsigned cs_count; #endif r600g_dma_blit_t dma_blit; + + /* Auxiliary context. Mainly used to initialize resources. + * It must be locked prior to using and flushed before unlocking. */ + struct pipe_context *aux_context; + pipe_mutex aux_context_lock; }; struct r600_pipe_sampler_view { @@ -721,6 +726,8 @@ void evergreen_update_db_shader_control(struct r600_context * rctx); /* r600_blit.c */ void r600_copy_buffer(struct pipe_context *ctx, struct pipe_resource *dst, unsigned dstx, struct pipe_resource *src, const struct pipe_box *src_box); +void r600_screen_clear_buffer(struct r600_screen *rscreen, struct pipe_resource *dst, + unsigned offset, unsigned size, unsigned char value); void r600_init_blit_functions(struct r600_context *rctx); void r600_blit_decompress_depth(struct pipe_context *ctx, struct r600_texture *texture, |