summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_screen.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-05-10 03:27:58 +0200
committerJerome Glisse <[email protected]>2010-05-27 23:24:02 +0200
commitb8fb1d75ce95fe5d404b301ab31ca0c323967d14 (patch)
tree78b648b638f7ed1560c569877c2c0c3b8b1dd81e /src/gallium/drivers/r600/r600_screen.h
parent72128962d640846472c1b0dc22cf4ac6ce875dc9 (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_screen.h')
-rw-r--r--src/gallium/drivers/r600/r600_screen.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_screen.h b/src/gallium/drivers/r600/r600_screen.h
index 97d57c027ed..4748021d079 100644
--- a/src/gallium/drivers/r600/r600_screen.h
+++ b/src/gallium/drivers/r600/r600_screen.h
@@ -29,16 +29,21 @@
#include <xf86drm.h>
#include <radeon_drm.h>
#include "radeon.h"
+#include "util/u_transfer.h"
#define r600_screen(s) ((struct r600_screen*)s)
+/* Texture transfer. */
struct r600_transfer {
+ /* Base class. */
struct pipe_transfer transfer;
+ /* Buffer transfer. */
+ struct pipe_transfer *buffer_transfer;
unsigned offset;
};
-struct r600_pipe_buffer {
- struct pipe_buffer base;
+struct r600_buffer {
+ struct u_resource b;
struct radeon_bo *bo;
u32 domain;
u32 flink;
@@ -50,7 +55,33 @@ struct r600_screen {
struct radeon *rw;
};
-void r600_screen_init_buffer_functions(struct pipe_screen *screen);
+/* Buffer functions. */
+struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
+ const struct pipe_resource *templ);
+struct pipe_resource *r600_user_buffer_create(struct pipe_screen *screen,
+ void *ptr, unsigned bytes,
+ unsigned bind);
+unsigned r600_buffer_is_referenced_by_cs(struct pipe_context *context,
+ struct pipe_resource *buf,
+ unsigned face, unsigned level);
+struct pipe_resource *r600_buffer_from_handle(struct pipe_screen *screen,
+ struct winsys_handle *whandle);
+
+/* Texture transfer functions. */
+struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
+ struct pipe_resource *texture,
+ struct pipe_subresource sr,
+ unsigned usage,
+ const struct pipe_box *box);
+void r600_texture_transfer_destroy(struct pipe_context *ctx,
+ struct pipe_transfer *trans);
+void* r600_texture_transfer_map(struct pipe_context *ctx,
+ struct pipe_transfer* transfer);
+void r600_texture_transfer_unmap(struct pipe_context *ctx,
+ struct pipe_transfer* transfer);
+
+
+/* Blit functions. */
void r600_clear(struct pipe_context *ctx,
unsigned buffers,
const float *rgba,