summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-05-05 19:44:16 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-05-05 19:44:16 +1000
commit33d9e213ee47aab32f662caf3e7c07c2697befbe (patch)
tree20fd91d378d396e8e2ace51ee23722d98f212fcc /src/mesa/main
parent1e6191e0af2653aa69bd623e25d2e157662e560f (diff)
parent736f535b4f1c5e6912b5b2fe9415a3b44a678844 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/main')
-rwxr-xr-x[-rw-r--r--]src/mesa/main/context.c10
-rw-r--r--src/mesa/main/texstate.c7
2 files changed, 13 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index d06644f65d..7b8d934170 100644..100755
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1504,15 +1504,19 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
* or not bound to a user-created FBO.
*/
if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) {
- _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer);
/* fix up the fb fields - these will end up wrong otherwise
- if the DRIdrawable changes, and everything relies on them.
- This is a bit messy (same as needed in _mesa_BindFramebufferEXT) */
+ * if the DRIdrawable changes, and everything relies on them.
+ * This is a bit messy (same as needed in _mesa_BindFramebufferEXT)
+ */
int i;
GLenum buffers[MAX_DRAW_BUFFERS];
+
+ _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer);
+
for(i = 0; i < newCtx->Const.MaxDrawBuffers; i++) {
buffers[i] = newCtx->Color.DrawBuffer[i];
}
+
_mesa_drawbuffers(newCtx, newCtx->Const.MaxDrawBuffers, buffers, NULL);
}
if (!newCtx->ReadBuffer || newCtx->ReadBuffer->Name == 0) {
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index cb7da39b51..84acfbd92c 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -238,6 +238,9 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state,
return;
}
+ if (mode == GL_REPLACE_EXT)
+ mode = GL_REPLACE;
+
switch (mode) {
case GL_REPLACE:
case GL_MODULATE:
@@ -340,7 +343,9 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
switch (pname) {
case GL_TEXTURE_ENV_MODE:
{
- const GLenum mode = (GLenum) (GLint) *param;
+ GLenum mode = (GLenum) (GLint) *param;
+ if (mode == GL_REPLACE_EXT)
+ mode = GL_REPLACE;
if (texUnit->EnvMode == mode)
return;
if (mode == GL_MODULATE ||