summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-24 16:06:21 -0600
committerBrian Paul <brianp@vmware.com>2009-09-24 16:06:21 -0600
commit29d27229a95837d085db785a2b4abb654457dafa (patch)
tree0a03c9dbe3e55fa9676137750da1ee465379b978 /src/mesa/drivers
parentfd56bee6c4de28da194333f93b52c40f1deb6163 (diff)
parent940ca2e837efe45caae1cf1d9665f6736347705d (diff)
Merge branch 'mesa_7_6_branch'
Conflicts: src/mesa/vbo/vbo_exec_array.c
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_generatemipmap.c21
4 files changed, 25 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 3c5b848319..c300c33adc 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -125,6 +125,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
/* We want the GLSL compiler to emit code that uses condition codes */
ctx->Shader.EmitCondCodes = GL_TRUE;
+ ctx->Shader.EmitNVTempInitialization = GL_TRUE;
ctx->Const.VertexProgram.MaxNativeInstructions = (16 * 1024);
ctx->Const.VertexProgram.MaxAluInstructions = 0;
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 0b0e6931a0..4be6c77aa1 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -248,6 +248,9 @@ static void prepare_constant_buffer(struct brw_context *brw)
GLuint offset = brw->curbe.vs_start * 16;
GLuint nr = brw->vs.prog_data->nr_params / 4;
+ if (brw->vertex_program->IsNVProgram)
+ _mesa_load_tracked_matrices(ctx);
+
/* Updates the ParamaterValues[i] pointers for all parameters of the
* basic type of PROGRAM_STATE_VAR.
*/
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index e3111c6680..f0c79efbd9 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -90,8 +90,6 @@ static void brw_upload_vs_prog(struct brw_context *brw)
struct brw_vertex_program *vp =
(struct brw_vertex_program *)brw->vertex_program;
- assert (vp && !vp->program.IsNVProgram);
-
memset(&key, 0, sizeof(key));
/* Just upload the program verbatim for now. Always send it all
diff --git a/src/mesa/drivers/dri/intel/intel_generatemipmap.c b/src/mesa/drivers/dri/intel/intel_generatemipmap.c
index 237754d469..5958b36c97 100644
--- a/src/mesa/drivers/dri/intel/intel_generatemipmap.c
+++ b/src/mesa/drivers/dri/intel/intel_generatemipmap.c
@@ -125,6 +125,8 @@ intel_generate_mipmap_2d(GLcontext *ctx,
GLuint fb_name;
GLboolean success = GL_FALSE;
struct gl_framebuffer *saved_fbo = NULL;
+ struct gl_buffer_object *saved_array_buffer = NULL;
+ struct gl_buffer_object *saved_element_buffer = NULL;
_mesa_PushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT |
GL_CURRENT_BIT | GL_COLOR_BUFFER_BIT |
@@ -133,6 +135,16 @@ intel_generate_mipmap_2d(GLcontext *ctx,
old_active_texture = ctx->Texture.CurrentUnit;
_mesa_reference_framebuffer(&saved_fbo, ctx->DrawBuffer);
+ /* use default array/index buffers */
+ _mesa_reference_buffer_object(ctx, &saved_array_buffer,
+ ctx->Array.ArrayBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
+ ctx->Shared->NullBufferObj);
+ _mesa_reference_buffer_object(ctx, &saved_element_buffer,
+ ctx->Array.ElementArrayBufferObj);
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj,
+ ctx->Shared->NullBufferObj);
+
_mesa_Disable(GL_POLYGON_STIPPLE);
_mesa_Disable(GL_DEPTH_TEST);
_mesa_Disable(GL_STENCIL_TEST);
@@ -205,6 +217,15 @@ fail:
meta_restore_fragment_program(&intel->meta);
meta_restore_vertex_program(&intel->meta);
+ /* restore array/index buffers */
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
+ saved_array_buffer);
+ _mesa_reference_buffer_object(ctx, &saved_array_buffer, NULL);
+ _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj,
+ saved_element_buffer);
+ _mesa_reference_buffer_object(ctx, &saved_element_buffer, NULL);
+
+
_mesa_DeleteFramebuffersEXT(1, &fb_name);
_mesa_ActiveTextureARB(GL_TEXTURE0_ARB + old_active_texture);
if (saved_fbo)