intel: Refactor intel_update_renderbuffers()
authorChad Versace <chad@chad-versace.us>
Fri, 3 Jun 2011 23:14:25 +0000 (16:14 -0700)
committerChad Versace <chad@chad-versace.us>
Wed, 8 Jun 2011 17:06:40 +0000 (10:06 -0700)
commit89d34cfd3e7c96cefc489fbb995124e2dc4a97ec
tree93ec0fdcf52ea618cde99880ee675f4699cbd2ad
parent84294fe26ca5860c34e6541f633be4d093ab57f2
intel: Refactor intel_update_renderbuffers()

Extract the code that queries DRI2 to obtain the DRIdrawable's buffers
into intel_query_dri2_buffers_no_separate_stencil().

Extract the code that assigns the DRI buffer's DRM region to the
corresponding renderbuffer into
intel_process_dri2_buffer_no_separate_stencil().

Rationale
---------
The next commit enables intel_update_renderbuffers() to query for separate
stencil and hiz buffers. Without separating the separate-stencil and
no-separate-stencil paths, intel_update_renderbuffers() degenerates into
an impenetrable labyrinth of if-trees.

CC: Ian Romanick <idr@freedesktop.org>
CC: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
src/mesa/drivers/dri/intel/intel_context.c