diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-08-02 15:17:27 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-08-12 18:47:24 +0200 |
commit | 412bd7360c46405de3158683ce0f349126c30b77 (patch) | |
tree | 4a0de2e51fd8250a013ced35b4e986f5b134d93a /src/mesa/state_tracker/st_context.h | |
parent | dd93cbc8945e182ab3130eeeb074fae798e5d4af (diff) | |
download | external_mesa3d-412bd7360c46405de3158683ce0f349126c30b77.zip external_mesa3d-412bd7360c46405de3158683ce0f349126c30b77.tar.gz external_mesa3d-412bd7360c46405de3158683ce0f349126c30b77.tar.bz2 |
st/mesa: don't update clip state if it has no effect
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r-- | src/mesa/state_tracker/st_context.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index e0f29e3..556b9c9 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -336,6 +336,13 @@ st_shader_stage_to_ptarget(gl_shader_stage stage) 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)) |