diff options
author | Matt Turner <mattst88@gmail.com> | 2015-07-07 18:51:30 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2015-07-09 15:17:02 -0700 |
commit | c04339486a26b7bee3575bf30dde4f7152a70211 (patch) | |
tree | 66ea3dbc75e2ef397d5bea5d534d00007c193dc7 /src/mesa/drivers/dri/i965/intel_batchbuffer.h | |
parent | 0166b4c165271bd7525a91049e58e390cb596c60 (diff) | |
download | external_mesa3d-c04339486a26b7bee3575bf30dde4f7152a70211.zip external_mesa3d-c04339486a26b7bee3575bf30dde4f7152a70211.tar.gz external_mesa3d-c04339486a26b7bee3575bf30dde4f7152a70211.tar.bz2 |
i965: Set brw->batch.emit only #ifdef DEBUG.
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>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index 8eaedd1..e58eae4 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -138,8 +138,8 @@ intel_batchbuffer_begin(struct brw_context *brw, int n, enum brw_gpu_ring ring) { 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 } |