summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-04-15 17:22:40 +0200
committerThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-04-15 17:24:06 +0200
commitb83cf05d0d986f324fe9c93525c84eb62fed4f20 (patch)
tree1448095235d814fac03be2c1df017dfdce286e5b /src/gallium/drivers/r300/r300_context.c
parent9b75627fab5bf2ea90f27ddd31b60c54895f6de6 (diff)
r300-gallium: Fixup for commit 9b75627fab5bf2ea90f27ddd31b60c54895f6de6.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 31efe914171..6bdf544a05c 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -102,6 +102,29 @@ static void r300_destroy_context(struct pipe_context* context) {
FREE(r300);
}
+static unsigned int
+r300_is_texture_referenced( struct pipe_context *pipe,
+ struct pipe_texture *texture,
+ unsigned face, unsigned level)
+{
+ /**
+ * FIXME: Optimize.
+ */
+
+ return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+}
+
+static unsigned int
+r300_is_buffer_referenced( struct pipe_context *pipe,
+ struct pipe_buffer *buf)
+{
+ /**
+ * FIXME: Optimize.
+ */
+
+ return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+}
+
struct pipe_context* r300_create_context(struct pipe_screen* screen,
struct r300_winsys* r300_winsys)
{
@@ -124,6 +147,9 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.draw_elements = r300_draw_elements;
r300->context.draw_range_elements = r300_draw_range_elements;
+ r300->context.is_texture_referenced = r300_is_texture_referenced;
+ r300->context.is_buffer_referenced = r300_is_buffer_referenced;
+
r300->draw = draw_create();
draw_set_rasterize_stage(r300->draw, r300_draw_stage(r300));