From: Eric Anholt Date: Fri, 10 Jul 2015 05:48:17 +0000 (-0700) Subject: vc4: Drop separate cl*_reloc_hindex(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=748bf459b46b44e184ee1d425ce612da61a0800e;p=mesa.git 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. --- 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 */