summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-12-15 12:38:01 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-12-15 12:38:01 -0800
commit11522b74b318db9d099466ff226124c23595e8e2 (patch)
tree2f57b1d594a9f6c223b002f1c549ea5f799b37cc /src/mesa
parentb90f7f3ad324b1e4c39e334cdeb9556c3eb808ab (diff)
parentf23d01e726a57cd6b8e31f1049ee5853773df7ea (diff)
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts: src/gallium/drivers/softpipe/sp_quad_blend.c
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i810/i810tris.c3
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c11
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tris.c3
-rw-r--r--src/mesa/drivers/dri/mga/mgatris.c3
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.c1
-rw-r--r--src/mesa/state_tracker/st_draw.c4
-rw-r--r--src/mesa/swrast/s_atifragshader.c2
-rw-r--r--src/mesa/swrast/s_triangle.c6
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h6
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h9
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp2.h11
-rw-r--r--src/mesa/x86/rtasm/x86sse.c2
12 files changed, 49 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i810/i810tris.c b/src/mesa/drivers/dri/i810/i810tris.c
index b508496fb69..213ba541cee 100644
--- a/src/mesa/drivers/dri/i810/i810tris.c
+++ b/src/mesa/drivers/dri/i810/i810tris.c
@@ -270,7 +270,8 @@ do { \
#define LOCAL_VARS(n) \
i810ContextPtr imesa = I810_CONTEXT(ctx); \
- GLuint color[n], spec[n]; \
+ GLuint color[n] = { 0 }; \
+ GLuint spec[n] = { 0 }; \
GLuint coloroffset = (imesa->vertex_size == 4 ? 3 : 4); \
GLboolean havespec = (imesa->vertex_size > 4); \
(void) color; (void) spec; (void) coloroffset; (void) havespec;
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 6b12d484d85..05643189a21 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -191,10 +191,15 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
return;
}
- /*
- * How many color buffers are we drawing into?
+ /* How many color buffers are we drawing into?
+ *
+ * If there are zero buffers or the buffer is too big, don't configure any
+ * regions for hardware drawing. We'll fallback to software below. Not
+ * having regions set makes some of the software fallback paths faster.
*/
- if (fb->_NumColorDrawBuffers == 0) {
+ if ((fb->Width > ctx->Const.MaxRenderbufferSize)
+ || (fb->Height > ctx->Const.MaxRenderbufferSize)
+ || (fb->_NumColorDrawBuffers == 0)) {
/* writing to 0 */
colorRegions[0] = NULL;
intel->constant_cliprect = GL_TRUE;
diff --git a/src/mesa/drivers/dri/mach64/mach64_tris.c b/src/mesa/drivers/dri/mach64/mach64_tris.c
index f2e8e2e3ae8..c2a0adfef02 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tris.c
+++ b/src/mesa/drivers/dri/mach64/mach64_tris.c
@@ -1297,7 +1297,8 @@ do { \
#define LOCAL_VARS(n) \
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \
- GLuint color[n], spec[n]; \
+ GLuint color[n] = { 0 }; \
+ GLuint spec[n] = { 0 }; \
GLuint vertex_size = mmesa->vertex_size; \
const GLuint xyoffset = 9; \
const GLuint coloroffset = 8; \
diff --git a/src/mesa/drivers/dri/mga/mgatris.c b/src/mesa/drivers/dri/mga/mgatris.c
index b93a21c3acf..c1bcd4b8531 100644
--- a/src/mesa/drivers/dri/mga/mgatris.c
+++ b/src/mesa/drivers/dri/mga/mgatris.c
@@ -397,7 +397,8 @@ do { \
#define LOCAL_VARS(n) \
mgaContextPtr mmesa = MGA_CONTEXT(ctx); \
- GLuint color[n], spec[n]; \
+ GLuint color[n] = { 0 }; \
+ GLuint spec[n] = { 0 }; \
(void) color; (void) spec;
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c
index 3e2bdbc91ff..be73094ca04 100644
--- a/src/mesa/shader/slang/slang_compile_operation.c
+++ b/src/mesa/shader/slang/slang_compile_operation.c
@@ -52,6 +52,7 @@ slang_operation_construct(slang_operation * oper)
_slang_variable_scope_ctr(oper->locals);
oper->fun = NULL;
oper->var = NULL;
+ oper->label = NULL;
return GL_TRUE;
}
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 68bc76b5723..5c6af1125a3 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -381,7 +381,7 @@ setup_interleaved_attribs(GLcontext *ctx,
{
struct pipe_context *pipe = ctx->st->pipe;
GLuint attr;
- const GLubyte *offset0;
+ const GLubyte *offset0 = NULL;
for (attr = 0; attr < vp->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
@@ -560,7 +560,7 @@ st_draw_vbo(GLcontext *ctx,
GLuint attr;
struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
unsigned num_vbuffers, num_velements;
- GLboolean userSpace;
+ GLboolean userSpace = GL_FALSE;
/* Gallium probably doesn't want this in some cases. */
if (!index_bounds_valid)
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c
index 5fefae6c42b..e88ff191239 100644
--- a/src/mesa/swrast/s_atifragshader.c
+++ b/src/mesa/swrast/s_atifragshader.c
@@ -279,7 +279,7 @@ handle_sample_op(GLcontext * ctx, struct atifs_machine *machine,
/* sample from unit idx using texinst->src as coords */
GLuint swizzle = texinst->swizzle;
GLuint coord_source = texinst->src;
- GLfloat tex_coords[4];
+ GLfloat tex_coords[4] = { 0 };
if (coord_source >= GL_TEXTURE0_ARB && coord_source <= GL_TEXTURE7_ARB) {
coord_source -= GL_TEXTURE0_ARB;
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index d80a6761f40..5bec6066967 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -553,6 +553,9 @@ affine_span(GLcontext *ctx, SWspan *span,
info.format = texImg->TexFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
+ info.er = 0; \
+ info.eg = 0; \
+ info.eb = 0; \
span.arrayMask |= SPAN_RGBA; \
\
if (info.envmode == GL_BLEND) { \
@@ -815,6 +818,9 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
info.format = texImg->TexFormat; \
info.filter = obj->MinFilter; \
info.envmode = unit->EnvMode; \
+ info.er = 0; \
+ info.eg = 0; \
+ info.eb = 0; \
\
if (info.envmode == GL_BLEND) { \
/* potential off-by-one error here? (1.0f -> 2048 -> 0) */ \
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 724b5e94fa5..bd20a8d972f 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -41,9 +41,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
GLenum mode = GL_FILL;
GLuint facing = 0;
GLchan saved_color[3][4];
- GLfloat saved_col0[3][4];
- GLfloat saved_spec[3][4];
- GLfloat saved_index[3];
+ GLfloat saved_col0[3][4] = { { 0 } };
+ GLfloat saved_spec[3][4] = { { 0 } };
+ GLfloat saved_index[3] = { 0 };
v[0] = &verts[e0];
v[1] = &verts[e1];
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index e4b535fb680..d568bfdb584 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -241,6 +241,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
tmp = ALLOC_VERTS(nr+1);
tmp = TAG(emit_verts)( ctx, j, nr, tmp );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
}
else {
TAG(emit_verts)( ctx, j, nr, ALLOC_VERTS(nr) );
@@ -254,6 +255,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
tmp = ALLOC_VERTS(2);
tmp = TAG(emit_verts)( ctx, start+1, 1, tmp );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
+ (void) tmp;
}
FLUSH();
@@ -358,6 +360,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
tmp = ALLOC_VERTS( nr );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp );
+ (void) tmp;
currentsz = dmasz;
}
@@ -397,6 +400,7 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
tmp = ALLOC_VERTS( nr );
tmp = TAG(emit_verts)( ctx, start, 1, tmp );
tmp = TAG(emit_verts)( ctx, j, nr - 1, tmp );
+ (void) tmp;
currentsz = dmasz;
}
@@ -634,6 +638,7 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
/* Send v1, v2, v3
*/
tmp = EMIT_VERTS(ctx, j + 1, 3, tmp);
+ (void) tmp;
}
}
else {
@@ -820,6 +825,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
tmp = ALLOC_ELTS(nr+1);
tmp = TAG(emit_elts)( ctx, elts+j, nr, tmp );
tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
+ (void) tmp;
}
else {
TAG(emit_elts)( ctx, elts+j, nr, ALLOC_ELTS(nr) );
@@ -833,6 +839,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
tmp = ALLOC_ELTS(2);
tmp = TAG(emit_elts)( ctx, elts+start+1, 1, tmp );
tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
+ (void) tmp;
}
FLUSH();
@@ -946,6 +953,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx,
tmp = ALLOC_ELTS( nr );
tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp );
+ (void) tmp;
FLUSH();
currentsz = dmasz;
}
@@ -983,6 +991,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx,
tmp = ALLOC_ELTS( nr );
tmp = TAG(emit_elts)( ctx, elts+start, 1, tmp );
tmp = TAG(emit_elts)( ctx, elts+j, nr - 1, tmp );
+ (void) tmp;
FLUSH();
currentsz = dmasz;
}
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp2.h b/src/mesa/tnl_dd/t_dd_dmatmp2.h
index 2380c49fdf4..cd225b6343e 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp2.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp2.h
@@ -266,6 +266,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
if (j + nr < count) {
ELT_TYPE *dest = ALLOC_ELTS( nr );
dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr );
+ (void) dest;
j += nr - 1;
CLOSE_ELTS();
}
@@ -273,6 +274,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
ELT_TYPE *dest = ALLOC_ELTS( nr + 1 );
dest = TAG(emit_consecutive_elts)( ctx, dest, j, nr );
dest = TAG(emit_consecutive_elts)( ctx, dest, start, 1 );
+ (void) dest;
j += nr;
CLOSE_ELTS();
}
@@ -554,6 +556,7 @@ static void TAG(render_points_elts)( GLcontext *ctx,
nr = MIN2( dmasz, count - j );
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -590,6 +593,7 @@ static void TAG(render_lines_elts)( GLcontext *ctx,
nr = MIN2( dmasz, count - j );
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
@@ -621,6 +625,7 @@ static void TAG(render_line_strip_elts)( GLcontext *ctx,
nr = MIN2( dmasz, count - j );
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -671,6 +676,7 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
j += nr - 1;
if (j + 1 >= count && (flags & PRIM_END)) {
dest = TAG(emit_elts)( ctx, dest, elts+start, 1 );
+ (void) dest;
}
CLOSE_ELTS();
}
@@ -703,6 +709,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
nr = MIN2( dmasz, count - j );
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -734,6 +741,7 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -759,6 +767,7 @@ static void TAG(render_tri_fan_elts)( GLcontext *ctx,
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+start, 1 );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -785,6 +794,7 @@ static void TAG(render_poly_elts)( GLcontext *ctx,
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+start, 1 );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr - 1 );
+ (void) dest;
CLOSE_ELTS();
}
}
@@ -843,6 +853,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
nr = MIN2( dmasz, count - j );
dest = ALLOC_ELTS( nr );
dest = TAG(emit_elts)( ctx, dest, elts+j, nr );
+ (void) dest;
CLOSE_ELTS();
}
}
diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c
index 5aedf5b04be..647be995c12 100644
--- a/src/mesa/x86/rtasm/x86sse.c
+++ b/src/mesa/x86/rtasm/x86sse.c
@@ -7,10 +7,12 @@
#define DISASSEM 0
#define X86_TWOB 0x0f
+#if 0
static unsigned char *cptr( void (*label)() )
{
return (unsigned char *)(unsigned long)label;
}
+#endif
static void do_realloc( struct x86_function *p )