aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_state.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-15 11:28:25 -0600
committerBrian <[email protected]>2007-10-15 11:28:25 -0600
commitc8bf63e992f902f1bef0c20e5b50f397c4d219a7 (patch)
tree00b3d20bbdd1ec8fbbc4f7c6fba86140f6e293ce /src/mesa/pipe/i915simple/i915_state.c
parent3eeef8aabe399a404d5c86dcc23066d9b5453a7f (diff)
feedback/rasterpos fix-ups
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c
index 19ca5e575fb..4a31747fe85 100644
--- a/src/mesa/pipe/i915simple/i915_state.c
+++ b/src/mesa/pipe/i915simple/i915_state.c
@@ -550,6 +550,33 @@ static void i915_set_framebuffer_state(struct pipe_context *pipe,
}
+static void
+i915_set_feedback_state(struct pipe_context *pipe,
+ const struct pipe_feedback_state *feedback)
+{
+ struct i915_context *i915 = i915_context(pipe);
+ i915->feedback = *feedback;
+ draw_set_feedback_state(i915->draw, feedback);
+}
+
+
+static void
+i915_set_feedback_buffer(struct pipe_context *pipe,
+ unsigned index,
+ const struct pipe_feedback_buffer *feedback)
+{
+ struct i915_context *i915 = i915_context(pipe);
+
+ assert(index < PIPE_MAX_FEEDBACK_ATTRIBS);
+
+ /* Need to be careful with referencing */
+ pipe->winsys->buffer_reference(pipe->winsys,
+ &i915->feedback_buffer[index].buffer,
+ feedback->buffer);
+ i915->feedback_buffer[index].size = feedback->size;
+ i915->feedback_buffer[index].start_offset = feedback->start_offset;
+}
+
static void i915_set_clear_color_state(struct pipe_context *pipe,
@@ -731,6 +758,9 @@ i915_init_state_functions( struct i915_context *i915 )
i915->pipe.set_clear_color_state = i915_set_clear_color_state;
i915->pipe.set_constant_buffer = i915_set_constant_buffer;
i915->pipe.set_framebuffer_state = i915_set_framebuffer_state;
+ i915->pipe.set_feedback_state = i915_set_feedback_state;
+ i915->pipe.set_feedback_buffer = i915_set_feedback_buffer;
+
i915->pipe.set_polygon_stipple = i915_set_polygon_stipple;
i915->pipe.set_scissor_state = i915_set_scissor_state;
i915->pipe.set_texture_state = i915_set_texture_state;