[Intel-gfx] [patch] Use intel_viewport for i915 dri driver

Eric Anholt eric at anholt.net
Fri Nov 14 03:39:07 CET 2008


On Tue, 2008-11-11 at 11:23 +0800, Li Peng wrote:
> 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

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
> 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;
>  }
> 
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081113/ce5d7d57/attachment.sig>


More information about the Intel-gfx mailing list