Commit 7eb5fd98 authored by Mike Blumenkrantz's avatar Mike Blumenkrantz 🏋 Committed by Marge Bot

mesa/st: handle running nir lower passes for ucp and psiz in tess stage

if tess is the last shader program to run then we need to perform these
lowering passes at that time rather than during the vs
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!5885>
parent db165e9d
......@@ -225,16 +225,16 @@ st_update_vp( struct st_context *st )
key.clip_negative_one_to_one =
st->ctx->Transform.ClipDepthMode == GL_NEGATIVE_ONE_TO_ONE;
if (!st->ctx->GeometryProgram._Current) {
if (!st->ctx->GeometryProgram._Current &&
!st->ctx->TessEvalProgram._Current) {
/* _NEW_POINT */
key.lower_point_size = st->lower_point_size &&
!st_point_size_per_vertex(st->ctx);
}
/* _NEW_TRANSFORM */
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx) &&
!st->ctx->GeometryProgram._Current)
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
/* _NEW_TRANSFORM */
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
}
simple_mtx_lock(&st->ctx->Shared->Mutex);
st->vp_variant = st_get_vp_variant(st, stvp, &key);
......
......@@ -260,7 +260,7 @@ st_invalidate_state(struct gl_context *ctx)
/* Update the vertex shader if ctx->Point was changed. */
if (st->lower_point_size && new_state & _NEW_POINT)
st->dirty |= ST_NEW_VS_STATE | ST_NEW_GS_STATE;
st->dirty |= ST_NEW_VS_STATE | ST_NEW_TES_STATE | ST_NEW_GS_STATE;
/* Which shaders are dirty will be determined manually. */
if (new_state & _NEW_PROGRAM) {
......@@ -724,15 +724,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
st_init_extensions(screen, &ctx->Const,
&ctx->Extensions, &st->options, ctx->API);
/* FIXME: add support for geometry and tessellation shaders for
* lower_point_size
*/
assert(!ctx->Extensions.OES_geometry_shader || !st->lower_point_size);
assert(!ctx->Extensions.ARB_tessellation_shader || !st->lower_point_size);
/* FIXME: add support for tessellation shaders for lower_ucp */
assert(!ctx->Extensions.ARB_tessellation_shader || !st->lower_ucp);
if (st_have_perfmon(st)) {
ctx->Extensions.AMD_performance_monitor = GL_TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment