aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/enable.c')
-rw-r--r--mesalib/src/mesa/main/enable.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index b688f050b..fdde24e36 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -21,9 +21,10 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
*/
@@ -33,7 +34,6 @@
#include "enable.h"
#include "light.h"
#include "simple_list.h"
-#include "mfeatures.h"
#include "mtypes.h"
#include "enums.h"
#include "api_arrayelt.h"
@@ -53,11 +53,6 @@ update_derived_primitive_restart_state(struct gl_context *ctx)
{
/* Update derived primitive restart state.
*/
- if (ctx->Array.PrimitiveRestart)
- ctx->Array._RestartIndex = ctx->Array.RestartIndex;
- else
- ctx->Array._RestartIndex = ~0;
-
ctx->Array._PrimitiveRestart = ctx->Array.PrimitiveRestart
|| ctx->Array.PrimitiveRestartFixedIndex;
}
@@ -140,8 +135,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
else
arrayObj->_Enabled &= ~flag;
- arrayObj->NewArrays |= flag;
-
if (ctx->Driver.Enable) {
ctx->Driver.Enable( ctx, cap, state );
}
@@ -419,10 +412,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
- if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
- ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
- else
- ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE;
break;
case GL_LINE_SMOOTH:
if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES)
@@ -431,7 +420,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
break;
case GL_LINE_STIPPLE:
if (ctx->API != API_OPENGL_COMPAT)
@@ -440,7 +428,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
if (ctx->API != API_OPENGL_COMPAT)
@@ -617,7 +604,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
break;
case GL_POLYGON_SMOOTH:
if (!_mesa_is_desktop_gl(ctx))
@@ -626,7 +612,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.SmoothFlag = state;
- ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
break;
case GL_POLYGON_STIPPLE:
if (ctx->API != API_OPENGL_COMPAT)
@@ -635,7 +620,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
if (!_mesa_is_desktop_gl(ctx))
@@ -966,7 +950,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
CHECK_EXTENSION(EXT_transform_feedback, cap);
if (ctx->RasterDiscard != state) {
- FLUSH_VERTICES(ctx, _NEW_RASTERIZER_DISCARD);
+ FLUSH_VERTICES(ctx, 0);
+ ctx->NewDriverState |= ctx->DriverFlags.NewRasterizerDiscard;
ctx->RasterDiscard = state;
}
break;