summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965/brw_pipe_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_fb.c')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_fb.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_fb.c b/src/gallium/drivers/i965/brw_pipe_fb.c
new file mode 100644
index 0000000000..d4ae332f46
--- /dev/null
+++ b/src/gallium/drivers/i965/brw_pipe_fb.c
@@ -0,0 +1,25 @@
+
+/**
+ * called from intelDrawBuffer()
+ */
+static void brw_set_draw_region( struct intel_context *intel,
+ struct intel_region *color_regions[],
+ struct intel_region *depth_region,
+ GLuint num_color_regions)
+{
+ struct brw_context *brw = brw_context(&intel->ctx);
+ GLuint i;
+
+ /* release old color/depth regions */
+ if (brw->state.depth_region != depth_region)
+ brw->state.dirty.brw |= BRW_NEW_DEPTH_BUFFER;
+ for (i = 0; i < brw->state.nr_color_regions; i++)
+ intel_region_release(&brw->state.color_regions[i]);
+ intel_region_release(&brw->state.depth_region);
+
+ /* reference new color/depth regions */
+ for (i = 0; i < num_color_regions; i++)
+ intel_region_reference(&brw->state.color_regions[i], color_regions[i]);
+ intel_region_reference(&brw->state.depth_region, depth_region);
+ brw->state.nr_color_regions = num_color_regions;
+}