diff options
author | Keith Whitwell <[email protected]> | 2009-10-23 17:01:32 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-10-23 17:03:45 +0100 |
commit | 57a920cb1a0b6051068e730747b3fb475de88aca (patch) | |
tree | 805821e52d27d0803ac0cd44c384a4d9a36aa5a8 /src/gallium/drivers/i965/brw_pipe_fb.c | |
parent | 2f5f7c07732577f60666e3cee69c75c9b035c145 (diff) |
i965g: wip
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_fb.c')
-rw-r--r-- | src/gallium/drivers/i965/brw_pipe_fb.c | 25 |
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 00000000000..d4ae332f469 --- /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; +} |