diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-12-07 12:30:35 +0100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-09 12:05:26 +1100 |
commit | 0a44a3fa2f9eb295106cd4c64549f55cc54f432f (patch) | |
tree | e4b6a6075dfe37f8ab70505b1cbed33bbb74bece /src/mesa/pipe/p_state.h | |
parent | 7f984e1d2ab65a3d34ec0c0ef7487211dd644561 (diff) |
Eliminate struct pipe_region.
Directly use struct pipe_buffer_handle for storage and struct pipe_surface for
(un)mapping.
Diffstat (limited to 'src/mesa/pipe/p_state.h')
-rw-r--r-- | src/mesa/pipe/p_state.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h index 077a8f5a06..44dec9b773 100644 --- a/src/mesa/pipe/p_state.h +++ b/src/mesa/pipe/p_state.h @@ -256,32 +256,20 @@ struct pipe_sampler_state }; -/*** - *** Resource Objects - ***/ - -struct pipe_region -{ - struct pipe_buffer_handle *buffer; /**< driver private buffer handle */ - - unsigned refcount; /**< Reference count for region */ - ubyte *map; /**< only non-NULL when region is actually mapped */ - unsigned map_refcount; /**< Reference count for mapping */ -}; - - /** - * 2D surface. This is basically a view into a pipe_region (memory buffer). + * 2D surface. This is basically a view into a memory buffer. * May be a renderbuffer, texture mipmap level, etc. */ struct pipe_surface { - struct pipe_region *region; + struct pipe_buffer_handle *buffer; /**< driver private buffer handle */ + ubyte *map; /**< only non-NULL when surface is actually mapped */ + unsigned map_refcount; /**< Reference count for mapping */ unsigned format; /**< PIPE_FORMAT_x */ unsigned cpp; /**< bytes per pixel */ unsigned width, height; unsigned pitch; /**< in pixels */ - unsigned offset; /**< offset from start of region, in bytes */ + unsigned offset; /**< offset from start of buffer, in bytes */ unsigned refcount; struct pipe_winsys *winsys; /**< winsys which owns/created the surface */ }; |