diff options
author | Marek Olšák <[email protected]> | 2012-12-09 18:51:31 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-12-12 13:12:31 +0100 |
commit | d225d076a9807083ea065462390981b9514b6cfc (patch) | |
tree | ae80bb230a75ded9f9cb731718c3bea2319f52c6 /src/gallium/drivers/r600/r600_pipe.h | |
parent | 8df3855eed67302e83e4b181c4fa02183ccc185a (diff) |
r600g: suballocate memory for fetch shaders from a large buffer
Fetch shaders are usually destroyed at the context destruction by the state
tracker, so we can put them all in a large buffer without wasting memory.
This reduces the number of relocations sent to the kernel a little bit.
Tested-by: Aaron Watry <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index e707a4adda6..c348c76975b 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -383,6 +383,11 @@ struct r600_scissor_state bool enable; /* r6xx only */ }; +struct r600_fetch_shader { + struct r600_resource *buffer; + unsigned offset; +}; + struct r600_context { struct pipe_context context; struct r600_screen *screen; @@ -391,6 +396,7 @@ struct r600_context { struct blitter_context *blitter; struct u_upload_mgr *uploader; struct u_suballocator *allocator_so_filled_size; + struct u_suballocator *allocator_fetch_shader; struct util_slab_mempool pool_transfers; /* Hardware info. */ |