summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.c
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_context.c
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_context.c')
-rw-r--r--src/gallium/drivers/r600/r600_context.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c
index faefdb4378e..e2760f9ecd1 100644
--- a/src/gallium/drivers/r600/r600_context.c
+++ b/src/gallium/drivers/r600/r600_context.c
@@ -29,6 +29,7 @@
#include <util/u_format.h>
#include <util/u_memory.h>
#include <util/u_blitter.h>
+#include "r600_resource.h"
#include "r600_screen.h"
#include "r600_texture.h"
#include "r600_context.h"
@@ -40,21 +41,6 @@ static void r600_destroy_context(struct pipe_context *context)
FREE(rctx);
}
-static unsigned int r600_is_texture_referenced(struct pipe_context *context,
- struct pipe_texture *texture,
- unsigned face, unsigned level)
-{
- struct pipe_buffer *buffer = NULL;
-
- r600_get_texture_buffer(context->screen, texture, &buffer, NULL);
- return context->is_buffer_referenced(context, buffer);
-}
-
-static unsigned int r600_is_buffer_referenced(struct pipe_context *context, struct pipe_buffer *buffer)
-{
- return 0;
-}
-
static void r600_flush(struct pipe_context *ctx, unsigned flags,
struct pipe_fence_handle **fence)
{
@@ -90,11 +76,10 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv)
rctx->context.draw_arrays = r600_draw_arrays;
rctx->context.draw_elements = r600_draw_elements;
rctx->context.draw_range_elements = r600_draw_range_elements;
- rctx->context.is_texture_referenced = r600_is_texture_referenced;
- rctx->context.is_buffer_referenced = r600_is_buffer_referenced;
rctx->context.flush = r600_flush;
r600_init_query_functions(rctx);
r600_init_state_functions(rctx);
+ r600_init_context_resource_functions(rctx);
#if 0
rctx->blitter = util_blitter_create(&rctx->context);
if (rctx->blitter == NULL) {