[Mesa-dev] [PATCH 2/2] r200: Initialize swrast before setting limits

2012-12-05 Thread Stefan Dösinger

>From f572545ee0e2e17322554f03409237e40c732d1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= 
Date: Mon, 3 Dec 2012 14:31:23 +0100
Subject: [PATCH 2/4] r200: Initialize swrast before setting limits

Otherwise the driver announces 4096 vertex shader constants and other
way too high limits.
---
 src/mesa/drivers/dri/r200/r200_context.c |   19 +--
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 360ba72..54cf33e 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -289,13 +289,20 @@ GLboolean r200CreateContext( gl_api api,
rmesa->radeon.swtcl.RenderIndex = ~0;
rmesa->radeon.hw.all_dirty = 1;
 
+   ctx = &rmesa->radeon.glCtx;
+   /* Initialize the software rasterizer and helper modules.
+*/
+   _swrast_CreateContext( ctx );
+   _vbo_CreateContext( ctx );
+   _tnl_CreateContext( ctx );
+   _swsetup_CreateContext( ctx );
+   _ae_create_context( ctx );
+
/* Set the maximum texture size small enough that we can guarentee that
 * all texture units can bind a maximal texture and have all of them in
 * texturable memory at once. Depending on the allow_large_textures driconf
 * setting allow larger textures.
 */
-
-   ctx = &rmesa->radeon.glCtx;
ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->radeon.optionCache,
 		 "texture_units");
ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
@@ -345,14 +352,6 @@ GLboolean r200CreateContext( gl_api api,
 
_mesa_set_mvp_with_dp4( ctx, GL_TRUE );
 
-   /* Initialize the software rasterizer and helper modules.
-*/
-   _swrast_CreateContext( ctx );
-   _vbo_CreateContext( ctx );
-   _tnl_CreateContext( ctx );
-   _swsetup_CreateContext( ctx );
-   _ae_create_context( ctx );
-
/* Install the customized pipeline:
 */
_tnl_destroy_pipeline( ctx );
-- 
1.7.8.6

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] r200: Initialize swrast before setting limits

2012-12-05 Thread Alex Deucher
Reviewed-by: Alex Deucher 

Also, should probably also make a note to apply this to the stable
branches.  While you are at it can you also check and see if radeon
needs a similar fix?

Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] r200: Initialize swrast before setting limits

2012-12-05 Thread Stefan Dösinger
On 12/05/12 15:23, Alex Deucher wrote:
> Also, should probably also make a note to apply this to the stable
> branches.  While you are at it can you also check and see if radeon
> needs a similar fix?
>From the code it looks like it needs a similar fix. I don't have a
pre-r250 card though so I can't test to be sure.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] r200: Initialize swrast before setting limits

2012-12-05 Thread Alex Deucher
On Wed, Dec 5, 2012 at 12:22 PM, Stefan Dösinger  wrote:
> On 12/05/12 15:23, Alex Deucher wrote:
>> Also, should probably also make a note to apply this to the stable
>> branches.  While you are at it can you also check and see if radeon
>> needs a similar fix?
> From the code it looks like it needs a similar fix. I don't have a
> pre-r250 card though so I can't test to be sure.

It should be ok.  If you make the patches, I'll apply them unless you
have mesa commit access and want do it yourself.

Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev