It's only used inside #ifdef DEBUG. Cuts ~1.7k of .text, and more
importantly prevents a larger code size regression in the next commit
when the .used field is replaced and calculated on demand.
text data bss dec hex filename
4945468 195152 26192
5166812 4ed6dc i965_dri.so before
4943740 195152 26192
5165084 4ed01c i965_dri.so after
And surround the emit and total fields with #ifdef DEBUG to prevent
such mistakes from happening again.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/** Last BO submitted to the hardware. Used for glFinish(). */
drm_intel_bo *last_bo;
+#ifdef DEBUG
uint16_t emit, total;
+#endif
uint16_t used, reserved_space;
uint32_t *map;
uint32_t *cpu_map;
{
intel_batchbuffer_require_space(brw, n * 4, ring);
- brw->batch.emit = brw->batch.used;
#ifdef DEBUG
+ brw->batch.emit = brw->batch.used;
brw->batch.total = n;
#endif
}