_mesa_set_enable(ctx, GL_TEXTURE_2D, !!(unit->Enabled & TEXTURE_2D_BIT));
_mesa_set_enable(ctx, GL_TEXTURE_3D, !!(unit->Enabled & TEXTURE_3D_BIT));
if (ctx->Extensions.ARB_texture_cube_map) {
- _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB,
+ _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP,
!!(unit->Enabled & TEXTURE_CUBE_BIT));
}
if (ctx->Extensions.NV_texture_rectangle) {
/* don't restore state for unsupported targets to prevent
* raising GL errors.
*/
- if (obj->Target == GL_TEXTURE_CUBE_MAP_ARB &&
+ if (obj->Target == GL_TEXTURE_CUBE_MAP &&
!ctx->Extensions.ARB_texture_cube_map) {
continue;
}
if (ctx->Extensions.ARB_color_buffer_float)
_mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB,
color->ClampFragmentColor);
- _mesa_ClampColor(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
+ if (ctx->Extensions.ARB_color_buffer_float || ctx->Version >= 30)
+ _mesa_ClampColor(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
/* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
if (ctx->Extensions.EXT_framebuffer_sRGB)
GLuint u;
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
_mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV,
- (GLint) point->CoordReplace[u]);
+ !!(point->CoordReplace & (1u << u)));
}
_mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
if (ctx->Extensions.NV_point_sprite)
_mesa_set_enablei(ctx, GL_SCISSOR_TEST, i,
(scissor->EnableFlags >> i) & 1);
}
+ if (ctx->Extensions.EXT_window_rectangles) {
+ STATIC_ASSERT(sizeof(struct gl_scissor_rect) ==
+ 4 * sizeof(GLint));
+ _mesa_WindowRectanglesEXT(
+ scissor->WindowRectMode, scissor->NumWindowRects,
+ (const GLint *)scissor->WindowRects);
+ }
}
break;
case GL_STENCIL_BUFFER_BIT:
struct texture_state *texstate
= (struct texture_state *) attr->data;
pop_texture_group(ctx, texstate);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE_OBJECT | _NEW_TEXTURE_STATE;
}
break;
case GL_VIEWPORT_BIT:
for (i = 0; i < ARRAY_SIZE(src->VertexAttrib); i++) {
_mesa_copy_client_array(ctx, &dest->_VertexAttrib[i], &src->_VertexAttrib[i]);
_mesa_copy_vertex_attrib_array(ctx, &dest->VertexAttrib[i], &src->VertexAttrib[i]);
- _mesa_copy_vertex_buffer_binding(ctx, &dest->VertexBinding[i], &src->VertexBinding[i]);
+ _mesa_copy_vertex_buffer_binding(ctx, &dest->BufferBinding[i], &src->BufferBinding[i]);
}
/* _Enabled must be the same than on push */
dest->_Enabled = src->_Enabled;
+ /* The bitmask of bound VBOs needs to match the VertexBinding array */
+ dest->VertexAttribBufferMask = src->VertexAttribBufferMask;
dest->NewArrays = src->NewArrays;
}