diff options
author | Marek Olšák <marek.olsak@amd.com> | 2015-07-05 16:34:59 +0200 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2015-07-23 00:59:21 +0200 |
commit | 4ef7d93a941257b18506eae056631e8f4a11f893 (patch) | |
tree | 1df336cd0c8595ce6e61937e71888b56259df983 /src/gallium/auxiliary/cso_cache/cso_context.c | |
parent | b7492a1f45866a01b00263f9e252ddc3835304e9 (diff) | |
download | external_mesa3d-4ef7d93a941257b18506eae056631e8f4a11f893.zip external_mesa3d-4ef7d93a941257b18506eae056631e8f4a11f893.tar.gz external_mesa3d-4ef7d93a941257b18506eae056631e8f4a11f893.tar.bz2 |
cso: remove clip state handling
There is no need for this.
v2: handle redundant clip state changes in st/mesa
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_context.c')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 46055a0..9ee5bdc 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -111,9 +111,6 @@ struct cso_context { uint render_condition_mode, render_condition_mode_saved; boolean render_condition_cond, render_condition_cond_saved; - struct pipe_clip_state clip; - struct pipe_clip_state clip_saved; - struct pipe_framebuffer_state fb, fb_saved; struct pipe_viewport_state vp, vp_saved; struct pipe_blend_color blend_color; @@ -910,47 +907,6 @@ void cso_restore_tesseval_shader(struct cso_context *ctx) ctx->tesseval_shader_saved = NULL; } -/* clip state */ - -static inline void -clip_state_cpy(struct pipe_clip_state *dst, - const struct pipe_clip_state *src) -{ - memcpy(dst->ucp, src->ucp, sizeof(dst->ucp)); -} - -static inline int -clip_state_cmp(const struct pipe_clip_state *a, - const struct pipe_clip_state *b) -{ - return memcmp(a->ucp, b->ucp, sizeof(a->ucp)); -} - -void -cso_set_clip(struct cso_context *ctx, - const struct pipe_clip_state *clip) -{ - if (clip_state_cmp(&ctx->clip, clip)) { - clip_state_cpy(&ctx->clip, clip); - ctx->pipe->set_clip_state(ctx->pipe, clip); - } -} - -void -cso_save_clip(struct cso_context *ctx) -{ - clip_state_cpy(&ctx->clip_saved, &ctx->clip); -} - -void -cso_restore_clip(struct cso_context *ctx) -{ - if (clip_state_cmp(&ctx->clip, &ctx->clip_saved)) { - clip_state_cpy(&ctx->clip, &ctx->clip_saved); - ctx->pipe->set_clip_state(ctx->pipe, &ctx->clip_saved); - } -} - enum pipe_error cso_set_vertex_elements(struct cso_context *ctx, unsigned count, |