diff options
author | Rob Clark <[email protected]> | 2017-11-28 10:47:06 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-12-15 08:09:44 -0500 |
commit | e94eb5e6000e293d73452b76a95754a3734f5065 (patch) | |
tree | 528c74507ac9c4d1528f6318e2cfb228ced6fa9e /src/gallium/include | |
parent | eac1aad6249da0479a5bf75f72025bc134c9a6cc (diff) |
gallium/util: add u_transfer_helper
Add a new helper that drivers can use to emulate various things that
need special handling in particular in transfer_map:
1) z32_s8x24.. gl/gallium treats this as a single buffer with depth
and stencil interleaved but hardware frequently treats this as
separate z32 and s8 buffers. Special pack/unpack handling is
needed in transfer_map/unmap to pack/unpack the exposed buffer
2) fake RGTC.. GPUs designed with GLES in mind, but which can other-
wise do GL3, if native RGTC is not supported it can be emulated
by converting to uncompressed internally, but needs pack/unpack
in transfer_map/unmap
3) MSAA resolves in the transfer_map() case
v2: add MSAA resolve based on Eric's "gallium: Add helpers for MSAA
resolves in pipe_transfer_map()/unmap()." patch; avoid wrapping
pipe_resource, to make it possible for drivers to use both this
and threaded_context.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index c249c7d63b4..101e229088b 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -60,7 +60,7 @@ struct pipe_box; struct pipe_memory_info; struct disk_cache; struct driOptionCache; - +struct u_transfer_helper; /** * Gallium screen/adapter context. Basically everything @@ -68,6 +68,12 @@ struct driOptionCache; * context. */ struct pipe_screen { + + /** + * For drivers using u_transfer_helper: + */ + struct u_transfer_helper *transfer_helper; + void (*destroy)( struct pipe_screen * ); const char *(*get_name)( struct pipe_screen * ); |