diff options
author | Ian Romanick <[email protected]> | 2010-08-13 20:22:46 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-08-13 20:22:46 -0700 |
commit | 443a7e4e9a360acbc3e662c098be436f180bf81d (patch) | |
tree | 71125fc394bdcbc17cd7ed74c592b9a7761541f8 /src/gallium/drivers/r600/r600_resource.h | |
parent | 2f8ee757ab324d599fcb8287789eb5f1a7890d74 (diff) | |
parent | 27041d7cb3faeaed483538a228573466363ec1c7 (diff) |
Merge branch 'master' into glsl2
Diffstat (limited to 'src/gallium/drivers/r600/r600_resource.h')
-rw-r--r-- | src/gallium/drivers/r600/r600_resource.h | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index 95084a371bd..bb90e76fb78 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -20,14 +20,47 @@ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #ifndef R600_RESOURCE_H #define R600_RESOURCE_H +#include "util/u_transfer.h" + struct r600_context; struct r600_screen; +/* This gets further specialized into either buffer or texture + * structures. Use the vtbl struct to choose between the two + * underlying implementations. + */ +struct r600_resource { + struct u_resource base; + struct radeon_bo *bo; + u32 domain; + u32 flink; + struct pb_buffer *pb; +}; + +struct r600_resource_texture { + struct r600_resource resource; + unsigned long offset[PIPE_MAX_TEXTURE_LEVELS]; + unsigned long pitch[PIPE_MAX_TEXTURE_LEVELS]; + unsigned long layer_size[PIPE_MAX_TEXTURE_LEVELS]; + unsigned long pitch_override; + unsigned long bpt; + unsigned long size; +}; + void r600_init_context_resource_functions(struct r600_context *r600); void r600_init_screen_resource_functions(struct r600_screen *r600screen); +/* r600_buffer */ +u32 r600_domain_from_usage(unsigned usage); + +/* r600_texture */ +struct pipe_resource *r600_texture_create(struct pipe_screen *screen, + const struct pipe_resource *templ); +struct pipe_resource *r600_texture_from_handle(struct pipe_screen *screen, + const struct pipe_resource *base, + struct winsys_handle *whandle); + #endif |