aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple/i915_context.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_context.c
parent3eeef8aabe399a404d5c86dcc23066d9b5453a7f (diff)
feedback/rasterpos fix-ups
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_context.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index 5d97eed247e..8150fcfbf5e 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -212,6 +212,19 @@ static boolean i915_draw_elements( struct pipe_context *pipe,
draw_set_mapped_element_buffer(draw, 0, NULL);
}
+ /* Map feedback buffers if enabled */
+ if (i915->feedback.enabled) {
+ const uint n = i915->feedback.interleaved ? 1 : i915->feedback.num_attribs;
+ for (i = 0; i < n; i++) {
+ void *ptr = pipe->winsys->buffer_map(pipe->winsys,
+ i915->feedback_buffer[i].buffer,
+ PIPE_BUFFER_FLAG_WRITE);
+ draw_set_mapped_feedback_buffer(draw, i, ptr,
+ i915->feedback_buffer[i].size);
+ }
+ }
+
+
draw_set_mapped_constant_buffer(draw,
i915->current.constants[PIPE_SHADER_VERTEX]);
@@ -232,6 +245,16 @@ static boolean i915_draw_elements( struct pipe_context *pipe,
draw_set_mapped_element_buffer(draw, 0, NULL);
}
+ /* Unmap feedback buffers if enabled */
+ if (i915->feedback.enabled) {
+ const uint n = i915->feedback.interleaved ? 1 : i915->feedback.num_attribs;
+ for (i = 0; i < n; i++) {
+ pipe->winsys->buffer_unmap(pipe->winsys,
+ i915->feedback_buffer[i].buffer);
+ draw_set_mapped_feedback_buffer(draw, i, NULL, 0);
+ }
+ }
+
return TRUE;
}