diff options
author | Iago Toral Quiroga <[email protected]> | 2017-01-02 16:28:55 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2017-01-04 08:14:21 +0100 |
commit | 1daa31d8a877a846393c827813324f0a38cf91b6 (patch) | |
tree | 399075e78bfd1a4cd26caa089aad40b590fdd8ec /src/mesa/drivers/dri/i965/intel_batchbuffer.h | |
parent | f03bac1fc7e34aeefc1a6adb11d733b9fda8d3ac (diff) |
i965: make intel_batchbuffer_emit_dword() take a batchbuffer as argument
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index c4573ec57b8..aca8fa1665b 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -94,27 +94,27 @@ static inline uint32_t float_as_int(float f) * work... */ static inline unsigned -intel_batchbuffer_space(struct brw_context *brw) +intel_batchbuffer_space(struct intel_batchbuffer *batch) { - return (brw->batch.state_batch_offset - brw->batch.reserved_space) - - USED_BATCH(brw->batch) * 4; + return (batch->state_batch_offset - batch->reserved_space) + - USED_BATCH(*batch) * 4; } static inline void -intel_batchbuffer_emit_dword(struct brw_context *brw, GLuint dword) +intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword) { #ifdef DEBUG - assert(intel_batchbuffer_space(brw) >= 4); + assert(intel_batchbuffer_space(batch) >= 4); #endif - *brw->batch.map_next++ = dword; - assert(brw->batch.ring != UNKNOWN_RING); + *batch->map_next++ = dword; + assert(batch->ring != UNKNOWN_RING); } static inline void -intel_batchbuffer_emit_float(struct brw_context *brw, float f) +intel_batchbuffer_emit_float(struct intel_batchbuffer *batch, float f) { - intel_batchbuffer_emit_dword(brw, float_as_int(f)); + intel_batchbuffer_emit_dword(batch, float_as_int(f)); } static inline void |