summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-07-13 07:22:24 +0800
committerChia-I Wu <[email protected]>2013-07-13 07:27:28 +0800
commit8d4ac9854969dfd6f8f39dbd6adeb3c8cfd60092 (patch)
treea33172c1813dcd9e13fa73480e4ef4f74921f35a /src
parentbf9670270fb3deef8ad194f1a1ee78e253769234 (diff)
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().
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
index d2f3300ceb3..eefb2f96b59 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
@@ -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;