static void evergreen_emit_tes_sampler_views(struct r600_context *rctx, struct r600_atom *atom)
{
+ if (!rctx->tes_shader)
+ return;
evergreen_emit_sampler_views(rctx, &rctx->samplers[PIPE_SHADER_TESS_EVAL].views,
EG_FETCH_CONSTANTS_OFFSET_VS + R600_MAX_CONST_BUFFERS, 0);
}
static void evergreen_emit_tes_sampler_states(struct r600_context *rctx, struct r600_atom *atom)
{
+ if (!rctx->tes_shader)
+ return;
evergreen_emit_sampler_states(rctx, &rctx->samplers[PIPE_SHADER_TESS_EVAL], 18,
R_00A414_TD_VS_SAMPLER0_BORDER_INDEX, 0);
}
}
}
+ /*
+ * XXX: I believe there's some fatal flaw in the dirty state logic when
+ * enabling/disabling tes.
+ * VS/ES share all buffer/resource/sampler slots. If TES is enabled,
+ * it will therefore overwrite the VS slots. If it now gets disabled,
+ * the VS needs to rebind all buffer/resource/sampler slots - not only
+ * has TES overwritten the corresponding slots, but when the VS was
+ * operating as LS the things with correpsonding dirty bits got bound
+ * to LS slots and won't reflect what is dirty as VS stage even if the
+ * TES didn't overwrite it. The story for re-enabled TES is similar.
+ * In any case, we're not allowed to submit any TES state when
+ * TES is disabled (the state tracker may not do this but this looks
+ * like an optimization to me, not something which can be relied on).
+ */
+
/* Update clip misc state. */
if (clip_so_current) {
r600_update_clip_state(rctx, clip_so_current);