mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
ilo: move a santiy check into its assert()
The compiler does not know that ilo_3d_pipeline_estimate_size() is pure and can be eliminated in a release build in gen6_pipeline_end(). Move the call into the assert().
This commit is contained in:
parent
bf9670270f
commit
8d4ac98549
1 changed files with 2 additions and 5 deletions
|
|
@ -1351,12 +1351,9 @@ gen6_pipeline_end(struct ilo_3d_pipeline *p,
|
|||
const struct ilo_context *ilo,
|
||||
struct gen6_pipeline_session *session)
|
||||
{
|
||||
int used, estimate;
|
||||
|
||||
/* sanity check size estimation */
|
||||
used = session->init_cp_space - ilo_cp_space(p->cp);
|
||||
estimate = ilo_3d_pipeline_estimate_size(p, ILO_3D_PIPELINE_DRAW, ilo);
|
||||
assert(used <= estimate);
|
||||
assert(session->init_cp_space - ilo_cp_space(p->cp) <=
|
||||
ilo_3d_pipeline_estimate_size(p, ILO_3D_PIPELINE_DRAW, ilo));
|
||||
|
||||
p->state.reduced_prim = session->reduced_prim;
|
||||
p->state.primitive_restart = ilo->draw->primitive_restart;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue