draw_vbo(struct ilo_3d *hw3d, const struct ilo_state_vector *vec)
{
bool need_flush = false;
- int max_len;
+ bool success;
+ int max_len, before_space;
ilo_3d_own_render_ring(hw3d);
assert(max_len <= ilo_cp_space(hw3d->cp));
}
+ /* space available before emission */
+ before_space = ilo_cp_space(hw3d->cp);
+
if (need_flush)
ilo_3d_pipeline_emit_flush(hw3d->pipeline);
+ success = ilo_3d_pipeline_emit_draw(hw3d->pipeline, vec);
+
+ /* sanity check size estimation */
+ assert(before_space - ilo_cp_space(hw3d->cp) <= max_len);
- return ilo_3d_pipeline_emit_draw(hw3d->pipeline, vec);
+ return success;
}
bool
session->pipe_dirty = vec->dirty;
session->reduced_prim = u_reduced_prim(vec->draw->mode);
- /* available space before the session */
- session->init_cp_space = ilo_cp_space(p->cp);
-
session->hw_ctx_changed =
(p->invalidate_flags & ILO_3D_PIPELINE_INVALIDATE_HW);
const struct ilo_state_vector *vec,
struct gen6_pipeline_session *session)
{
- /* sanity check size estimation */
- assert(session->init_cp_space - ilo_cp_space(p->cp) <=
- ilo_3d_pipeline_estimate_size(p, ILO_3D_PIPELINE_DRAW, vec));
-
p->state.reduced_prim = session->reduced_prim;
p->state.primitive_restart = vec->draw->primitive_restart;
}