diff options
author | Kenneth Graunke <[email protected]> | 2018-01-05 12:27:41 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-01-06 20:10:32 -0800 |
commit | be144e251c548b45d0c4f9eb757a21110a73725b (patch) | |
tree | 565cf457cc2e27a42f4f13e55cab7ca7767d3f3e | |
parent | 1c9f1a28c0738a0b1cb8626af431d18eeee3f4f1 (diff) |
i965: Torch public intel_batchbuffer_emit_dword/float helpers.
intel_batchbuffer_emit_float is dead code, it should go.
intel_batchbuffer_emit_dword only had one user, which had bungled using
them by forgetting to call intel_batchbuffer_require_space first. So it
seems wise to delete these unsafe helpers.
Cc: [email protected]
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 13 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 3fd8e05d3dc..a17e1699254 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -692,9 +692,9 @@ brw_finish_batch(struct brw_context *brw) * necessary by emitting an extra MI_NOOP after the end. */ intel_batchbuffer_require_space(brw, 8, brw->batch.ring); - intel_batchbuffer_emit_dword(&brw->batch, MI_BATCH_BUFFER_END); + *brw->batch.map_next++ = MI_BATCH_BUFFER_END; if (USED_BATCH(brw->batch) & 1) { - intel_batchbuffer_emit_dword(&brw->batch, MI_NOOP); + *brw->batch.map_next++ = MI_NOOP; } brw->batch.no_wrap = false; diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index a927fe7e09e..a9a34600ad1 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -79,19 +79,6 @@ static inline uint32_t float_as_int(float f) } static inline void -intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword) -{ - *batch->map_next++ = dword; - assert(batch->ring != UNKNOWN_RING); -} - -static inline void -intel_batchbuffer_emit_float(struct intel_batchbuffer *batch, float f) -{ - intel_batchbuffer_emit_dword(batch, float_as_int(f)); -} - -static inline void intel_batchbuffer_begin(struct brw_context *brw, int n, enum brw_gpu_ring ring) { intel_batchbuffer_require_space(brw, n * 4, ring); |