[Intel-gfx] [patch] Use intel_viewport for i915 dri driver
Li Peng
peng.li at linux.intel.com
Tue Nov 11 04:23:48 CET 2008
I followed the dri2 discussion on dri-devel
(http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg35990.html), current dri2 implementation depends on glViewport being called whenever the window/framebuffer is resized, otherwise renderbuffer can't be updated. In i915 dri driver, we first set functions->Viewport to intel_viewport, then this function pointer is overrided by intelViewport, who calls intelCalcViewport and doesn't update renderbuffer.
With this patch, we can resize glxgears as normal.
This patch also fix a metacity-clutter/DRI2 issue, that we only have
640x480 preallocated renderbuffer at metacity-clutter start and then the
buffers can't be updated anymore.
Please review and your comments are welcome. Thanks
Peng
diff --git a/src/mesa/drivers/dri/i915/intel_state.c
b/src/mesa/drivers/dri/i915/intel_state.c
index 09aa62d..c99bb16 100644
--- a/src/mesa/drivers/dri/i915/intel_state.c
+++ b/src/mesa/drivers/dri/i915/intel_state.c
@@ -289,7 +289,6 @@ void
intelInitStateFuncs(struct dd_function_table *functions)
{
functions->RenderMode = intelRenderMode;
- functions->Viewport = intelViewport;
functions->DepthRange = intelDepthRange;
functions->ClearColor = intelClearColor;
}
More information about the Intel-gfx
mailing list