[Intel-gfx] [patch] Use intel_viewport for i915 dri driver
eric at anholt.net
Thu Nov 13 18:39:07 PST 2008
On Tue, 2008-11-11 at 11:23 +0800, Li Peng wrote:
> I followed the dri2 discussion on dri-devel
> (http://firstname.lastname@example.org/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
Your patch results in i915's Viewport not getting called. Replacement
patch to follow.
> diff --git a/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;
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/intel-gfx/attachments/20081113/ce5d7d57/attachment.pgp
More information about the Intel-gfx