On sobota, 18 kwietnia 2009 14:42:39 Maciej Cencora wrote:
> Hi,
>
> included patch-set cleans up some unused code and merges r300 and r500
> fragment shader related functions.
>
> Other planned tasks:
> - move r{3,5}00{SetupPixelShader,SetupRSunit, SetupFragmentShadersTextures}
> into separate files
> - merge r{3,5}00_transform_TEX
>
> I'd appreciate any comments and proposals for cleanup/merging.
>
> Regards,
> Maciej Cencora

since Dave already committed those, here're two patches that fix some problems 
with the patchset.

Maciej Cencora
From cf64d9213a604d6d114bc253e349a3f9514ba2d0 Mon Sep 17 00:00:00 2001
From: Maciej Cencora <[email protected]>
Date: Sun, 19 Apr 2009 15:26:51 +0200
Subject: [PATCH] r300: revert part of cb4bef7ae0b5fe8de82c380bc98f19067394d355

Some debugging code got there by accident
---
 src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c |   28 +++------------------
 1 files changed, 4 insertions(+), 24 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index f7c50e9..34d6261 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -61,21 +61,21 @@ static int radeon_compressed_num_bytes(GLuint mesaFormat)
 {
    int bytes = 0;
    switch(mesaFormat) {
-
+     
    case MESA_FORMAT_RGB_FXT1:
    case MESA_FORMAT_RGBA_FXT1:
    case MESA_FORMAT_RGB_DXT1:
    case MESA_FORMAT_RGBA_DXT1:
      bytes = 2;
      break;
-
+     
    case MESA_FORMAT_RGBA_DXT3:
    case MESA_FORMAT_RGBA_DXT5:
      bytes = 4;
    default:
      break;
    }
-
+   
    return bytes;
 }
 
@@ -97,38 +97,18 @@ static void compute_tex_image_offset(radeon_mipmap_tree *mt,
 		lvl->rowstride = (lvl->width * mt->bpp + 63) & ~63;
 		lvl->size = radeon_compressed_texture_size(mt->radeon->glCtx,
 							   lvl->width, lvl->height, lvl->depth, mt->compressed);
-		if (lvl->size <= 0) {
-			int *i = 0;
-			*i = 0;
-		}
-		assert(lvl->size > 0);
 	} else if (mt->target == GL_TEXTURE_RECTANGLE_NV) {
 		lvl->rowstride = (lvl->width * mt->bpp + 63) & ~63;
 		lvl->size = lvl->rowstride * lvl->height;
-		if (lvl->size <= 0) {
-			int *i = 0;
-			*i = 0;
-		}
-		assert(lvl->size > 0);
 	} else if (mt->tilebits & RADEON_TXO_MICRO_TILE) {
 		/* tile pattern is 16 bytes x2. mipmaps stay 32 byte aligned,
 		 * though the actual offset may be different (if texture is less than
 		 * 32 bytes width) to the untiled case */
 		lvl->rowstride = (lvl->width * mt->bpp * 2 + 31) & ~31;
 		lvl->size = lvl->rowstride * ((lvl->height + 1) / 2) * lvl->depth;
-		if (lvl->size <= 0) {
-			int *i = 0;
-			*i = 0;
-		}
-		assert(lvl->size > 0);
 	} else {
 		lvl->rowstride = (lvl->width * mt->bpp + 31) & ~31;
 		lvl->size = lvl->rowstride * lvl->height * lvl->depth;
-		if (lvl->size <= 0) {
-			int *i = 0;
-			*i = 0;
-		}
-		assert(lvl->size > 0);
 	}
 	assert(lvl->size > 0);
 
@@ -250,7 +230,7 @@ static void calculate_first_last_level(struct gl_texture_object *tObj,
 		tObj->Image[face][level];
 
 	assert(baseImage);
-
+	
 	/* These must be signed values.  MinLod and MaxLod can be negative numbers,
 	* and having firstLevel and lastLevel as signed prevents the need for
 	* extra sign checks.
-- 
1.5.6.3

From e38523e8d26673f28651a84e0471abd6610706af Mon Sep 17 00:00:00 2001
From: Maciej Cencora <[email protected]>
Date: Sun, 19 Apr 2009 15:28:10 +0200
Subject: [PATCH] r300: fix missing function declaration

---
 src/mesa/drivers/dri/r300/r300_context.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 949a3ca..1c7bfc8 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -659,6 +659,8 @@ extern int r300VertexProgUpdateParams(GLcontext * ctx,
 				      struct r300_vertex_program_cont *vp,
 				      float *dst);
 
+extern void r300InitShaderFunctions(r300ContextPtr r300);
+
 #define r300PackFloat32 radeonPackFloat32
 #define r300PackFloat24 radeonPackFloat24
 
-- 
1.5.6.3

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to