From 748bf459b46b44e184ee1d425ce612da61a0800e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 9 Jul 2015 22:48:17 -0700 Subject: vc4: Drop separate cl*_reloc_hindex(). Now that RCL generation is in the kernel, we don't have any other callers. Oddly, the compiler generates another 8 bytes of code for this, but the simplification is worth it. --- src/gallium/drivers/vc4/vc4_cl.h | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/vc4/vc4_cl.h b/src/gallium/drivers/vc4/vc4_cl.h index 4974da1530f..3aa4721a414 100644 --- a/src/gallium/drivers/vc4/vc4_cl.h +++ b/src/gallium/drivers/vc4/vc4_cl.h @@ -145,9 +145,10 @@ cl_start_shader_reloc(struct vc4_cl *cl, uint32_t n) } static inline void -cl_reloc_hindex(struct vc4_cl *cl, uint32_t hindex, uint32_t offset) +cl_reloc(struct vc4_context *vc4, struct vc4_cl *cl, + struct vc4_bo *bo, uint32_t offset) { - *(uint32_t *)cl->reloc_next = hindex; + *(uint32_t *)cl->reloc_next = vc4_gem_hindex(vc4, bo); cl->reloc_next += 4; cl->reloc_count--; @@ -156,9 +157,10 @@ cl_reloc_hindex(struct vc4_cl *cl, uint32_t hindex, uint32_t offset) } static inline void -cl_aligned_reloc_hindex(struct vc4_cl *cl, uint32_t hindex, uint32_t offset) +cl_aligned_reloc(struct vc4_context *vc4, struct vc4_cl *cl, + struct vc4_bo *bo, uint32_t offset) { - *(uint32_t *)cl->reloc_next = hindex; + *(uint32_t *)cl->reloc_next = vc4_gem_hindex(vc4, bo); cl->reloc_next += 4; cl->reloc_count--; @@ -166,20 +168,6 @@ cl_aligned_reloc_hindex(struct vc4_cl *cl, uint32_t hindex, uint32_t offset) cl_aligned_u32(cl, offset); } -static inline void -cl_reloc(struct vc4_context *vc4, struct vc4_cl *cl, - struct vc4_bo *bo, uint32_t offset) -{ - cl_reloc_hindex(cl, vc4_gem_hindex(vc4, bo), offset); -} - -static inline void -cl_aligned_reloc(struct vc4_context *vc4, struct vc4_cl *cl, - struct vc4_bo *bo, uint32_t offset) -{ - cl_aligned_reloc_hindex(cl, vc4_gem_hindex(vc4, bo), offset); -} - void cl_ensure_space(struct vc4_cl *cl, uint32_t size); #endif /* VC4_CL_H */ -- cgit v1.2.3