i915: Fix map/unmap mismatches from leaving INTEL_FALLBACK during TNL.
authorEric Anholt <eric@anholt.net>
Mon, 11 Jul 2011 18:32:04 +0000 (11:32 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 12 Jul 2011 21:40:39 +0000 (14:40 -0700)
commit6e6b38860488a0b2b282866f095cea9860503a14
tree2b563dfcaed156ceb2c21f2339971c786001f2a2
parentaceb66951d467844f2d722cf5d6bd6c429207cd2
i915: Fix map/unmap mismatches from leaving INTEL_FALLBACK during TNL.

The first rendering after context create didn't know of the color
buffer yet, triggering a sw fallback.  The intel_prepare_render() from
intelSpanRenderStart then found the buffer and turned off fallbacks,
but intelSpanRenderFinish was never called and things were left
mapped.  By checking buffers before making the call on whether to do
the fallback pipeline or not, we avoid the fallback change inside of
the rendering pipeline.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31561
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/intel_tris.c
src/mesa/drivers/dri/intel/intel_context.h