summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-04-09 10:14:35 +1000
committerDave Airlie <[email protected]>2009-04-09 10:31:08 +1000
commitd1a9b1f513109c975a5a7ed5a2d0c329b280afe4 (patch)
tree5c85af47b4f5af0661acf129e3ce3f59e43cbfd9 /src/mesa/drivers/dri/r300
parent90ffce497395d8c02fee2ea4ee4c025eede3d876 (diff)
parent8648c2685870174cf620ef15de70ef030a8d5a20 (diff)
Merge remote branch 'origin/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r200/r200_tex.c src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_context.h src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/r300_tex.c src/mesa/drivers/dri/r300/r300_texmem.c src/mesa/drivers/dri/r300/r300_texstate.c src/mesa/drivers/dri/radeon/radeon_tex.c
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c11
4 files changed, 12 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 06db7ab8ff4..5f279d6629e 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -345,10 +345,10 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
ctx->Const.MaxTextureMaxAnisotropy = 16.0;
ctx->Const.MaxTextureLodBias = 16.0;
- if (screen->chip_family >= CHIP_FAMILY_RV515) {
+ if (screen->chip_family >= CHIP_FAMILY_RV515)
ctx->Const.MaxTextureLevels = 13;
- ctx->Const.MaxTextureRectSize = 4096;
- }
+ else
+ ctx->Const.MaxTextureLevels = 12;
ctx->Const.MinPointSize = 1.0;
ctx->Const.MinPointSizeAA = 1.0;
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 86e68e35fc6..602f86ba669 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -76,8 +76,6 @@ typedef struct r300_context *r300ContextPtr;
-/************ DMA BUFFERS **************/
-
/* The blit width for texture uploads
*/
#define R300_BLIT_WIDTH_BYTES 1024
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index d8a68f7fc5e..ca91cf750b5 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -460,7 +460,7 @@ do { \
#define LOCAL_VARS(n) \
r300ContextPtr rmesa = R300_CONTEXT(ctx); \
- GLuint color[n] = { 0, }, spec[n] = { 0, }; \
+ GLuint color[n] = { 0, }, spec[n] = { 0, }; \
GLuint coloroffset = rmesa->swtcl.coloroffset; \
GLuint specoffset = rmesa->swtcl.specoffset; \
(void) color; (void) spec; (void) coloroffset; (void) specoffset;
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 0cbb2bcf3f1..0af5bb4f469 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -176,8 +176,13 @@ static void r300SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
}
}
-static void r300SetTexBorderColor(radeonTexObjPtr t, GLubyte c[4])
+static void r300SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
{
+ GLubyte c[4];
+ CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]);
+ CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]);
+ CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]);
+ CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]);
t->pp_border_color = PACK_COLOR_8888(c[3], c[0], c[1], c[2]);
}
@@ -211,7 +216,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- r300SetTexBorderColor(t, texObj->_BorderChan);
+ r300SetTexBorderColor(t, texObj->BorderColor);
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -308,7 +313,7 @@ static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx,
/* Initialize hardware state */
r300UpdateTexWrap(t);
r300SetTexFilter(t, t->base.MinFilter, t->base.MagFilter, t->base.MaxAnisotropy);
- r300SetTexBorderColor(t, t->base._BorderChan);
+ r300SetTexBorderColor(t, t->base.BorderColor);
return &t->base;
}