diff options
author | Marek Olšák <[email protected]> | 2010-05-10 03:27:58 +0200 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-05-27 23:24:02 +0200 |
commit | b8fb1d75ce95fe5d404b301ab31ca0c323967d14 (patch) | |
tree | 78b648b638f7ed1560c569877c2c0c3b8b1dd81e /src/gallium/drivers/r600/r600_texture.h | |
parent | 72128962d640846472c1b0dc22cf4ac6ce875dc9 (diff) |
r600g: adapt to latest interfaces changes
- Wrapped the buffer and texture create/destroy/transfer/... functions
using u_resource, which is then used to implement the resource functions.
- Implemented texture transfers.
I left the buffer and texture transfers separate because one day we'll
need a special codepath for textures.
- Added index_bias to the draw_*elements functions.
- Removed nonexistent *REP and *FOR instructions.
- Some pipe formats have changed channel ordering, so I've removed/fixed
nonexistent ones.
- Added stubs for create/set/destroy sampler views.
- Added a naive implementation of vertex elements state (new CSO).
- Reworked {texture,buffer}_{from,to}_handle.
- Reorganized winsys files, removed dri,egl,python directories.
- Added a new build target dri-r600.
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.h b/src/gallium/drivers/r600/r600_texture.h index a4424161ebc..9bc08d6b040 100644 --- a/src/gallium/drivers/r600/r600_texture.h +++ b/src/gallium/drivers/r600/r600_texture.h @@ -26,21 +26,28 @@ #include <pipe/p_state.h> struct r600_texture { - struct pipe_texture tex; + struct u_resource b; unsigned long offset[PIPE_MAX_TEXTURE_LEVELS]; unsigned long pitch[PIPE_MAX_TEXTURE_LEVELS]; unsigned long stride[PIPE_MAX_TEXTURE_LEVELS]; unsigned long layer_size[PIPE_MAX_TEXTURE_LEVELS]; unsigned long stride_override; unsigned long size; - struct pipe_buffer *buffer; + struct pipe_resource *buffer; }; +struct pipe_resource *r600_texture_create(struct pipe_screen *screen, + const struct pipe_resource *templ); unsigned long r600_texture_get_offset(struct r600_texture *rtex, unsigned level, unsigned zslice, unsigned face); +struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen, + const struct pipe_resource *base, + struct winsys_handle *whandle); void r600_init_screen_texture_functions(struct pipe_screen *screen); -boolean r600_get_texture_buffer(struct pipe_screen *screen, - struct pipe_texture *texture, - struct pipe_buffer **buffer, - unsigned *stride); + +/* This should be implemented by winsys. */ +boolean r600_buffer_get_handle(struct radeon *rw, + struct pipe_resource *buf, + struct winsys_handle *whandle); + #endif |