Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
pipeline_mask &= ~ST_NEW_TES_RESOURCES;
if (!ctx->GeometryProgram._Current)
pipeline_mask &= ~ST_NEW_GS_RESOURCES;
- if (!ctx->Transform.ClipPlanesEnabled)
- pipeline_mask &= ~ST_NEW_CLIP_STATE;
-
break;
case ST_PIPELINE_COMPUTE:
if (ctx->ComputeProgram._Current != &st->cp->Base)
}
if (new_state & (_NEW_PROJECTION |
- _NEW_TRANSFORM))
+ _NEW_TRANSFORM) &&
+ st_user_clip_planes_enabled(ctx))
st->dirty |= ST_NEW_CLIP_STATE;
if (new_state & _NEW_COLOR)
return PIPE_SHADER_VERTEX;
}
+static inline bool
+st_user_clip_planes_enabled(struct gl_context *ctx)
+{
+ return (ctx->API == API_OPENGL_COMPAT ||
+ ctx->API == API_OPENGLES) && /* only ES 1.x */
+ ctx->Transform.ClipPlanesEnabled;
+}
/** clear-alloc a struct-sized object, with casting */
#define ST_CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T))