summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2007-01-04 18:37:10 -0800
committerIan Romanick <[email protected]>2007-01-04 18:37:10 -0800
commit16f0efca605600bdac83898f1505af99c4c71048 (patch)
treef2c7e42f8f56fac25eb79e5fb434b99d9c5eaa59 /src
parent5ca107a4f215b84176123fd7a2d5fe14508a9f62 (diff)
parent1d312ae0137eb39bf74fac91eb97ed25c289a4ca (diff)
Merge branch 'master' of ssh+git://[email protected]/git/mesa/mesa
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/indirect_vertex_array.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index 429b52ae635..1855547dced 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -527,7 +527,7 @@ static GLubyte *
emit_DrawArrays_header_old( __GLXcontext * gc,
struct array_state_vector * arrays,
size_t * elements_per_request,
- unsigned int * total_requests,
+ size_t * total_requests,
GLenum mode, GLsizei count )
{
size_t command_size;
@@ -640,7 +640,7 @@ emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count )
GLubyte * pc;
size_t elements_per_request;
- unsigned total_requests = 0;
+ size_t total_requests = 0;
unsigned i;
size_t total_sent = 0;
@@ -770,7 +770,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
GLubyte * pc;
size_t elements_per_request;
- unsigned total_requests = 0;
+ size_t total_requests = 0;
unsigned i;
unsigned req;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c
index f00162a6dc7..179bc58e9e9 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog.c
@@ -257,7 +257,7 @@ static const GLuint undef = REG(REG_TYPE_TEMP,
GL_FALSE);
/* constant one source */
-static const GLuint pfs_one = REG(REG_TYPE_TEMP,
+static const GLuint pfs_one = REG(REG_TYPE_CONST,
0,
SWIZZLE_111,
SWIZZLE_ONE,
@@ -265,7 +265,7 @@ static const GLuint pfs_one = REG(REG_TYPE_TEMP,
GL_TRUE);
/* constant half source */
-static const GLuint pfs_half = REG(REG_TYPE_TEMP,
+static const GLuint pfs_half = REG(REG_TYPE_CONST,
0,
SWIZZLE_HHH,
SWIZZLE_HALF,
@@ -273,7 +273,7 @@ static const GLuint pfs_half = REG(REG_TYPE_TEMP,
GL_TRUE);
/* constant zero source */
-static const GLuint pfs_zero = REG(REG_TYPE_TEMP,
+static const GLuint pfs_zero = REG(REG_TYPE_CONST,
0,
SWIZZLE_000,
SWIZZLE_ZERO,
@@ -463,7 +463,8 @@ static int swz_native(struct r300_fragment_program *rp,
GLuint arbneg)
{
/* Native swizzle, handle negation */
- src |= ((arbneg >> 3) & 1) << REG_NEGS_SHIFT;
+ src = (src & ~REG_NEGS_SHIFT) |
+ (((arbneg >> 3) & 1) << REG_NEGS_SHIFT);
if ((arbneg & 0x7) == 0x0) {
src = src & ~REG_NEGV_MASK;