/**************************************************************************
- *
+ *
* Copyright 2003 VMware, Inc.
* All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
- *
+ *
* 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 NON-INFRINGEMENT.
* 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.
- *
+ *
**************************************************************************/
/**
* Brian Paul
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/framebuffer.h"
#include "main/state.h"
key.lower_two_sided_color = st->lower_two_sided_color &&
_mesa_vertex_program_two_side_enabled(st->ctx);
- /* _NEW_FRAG_CLAMP */
+ /* gl_driver_flags::NewFragClamp */
key.clamp_color = st->clamp_frag_color_in_shader &&
st->ctx->Color._ClampFragmentColor;
!st_point_size_per_vertex(st->ctx);
/* _NEW_TRANSFORM */
- if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
+ if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx) &&
+ !st->ctx->GeometryProgram._Current)
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
st->vp_variant = st_get_vp_variant(st, stvp, &key);
st_reference_prog(st, &st->vp, stvp);
- cso_set_vertex_shader_handle(st->cso_context,
+ cso_set_vertex_shader_handle(st->cso_context,
st->vp_variant->base.driver_shader);
}
key.clip_negative_one_to_one =
st->ctx->Transform.ClipDepthMode == GL_NEGATIVE_ONE_TO_ONE;
+ if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx) &&
+ pipe_shader == PIPE_SHADER_GEOMETRY)
+ key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
}
return st_get_common_variant(st, stp, &key)->driver_shader;