diff options
author | Iago Toral Quiroga <[email protected]> | 2019-07-26 08:57:52 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2019-08-08 08:36:52 +0200 |
commit | 9b316ab57a61dff6f1bcf6df9b0862e6d60733cd (patch) | |
tree | bc9c43a6f1550a6f0b20c6b5d136e83e211aa120 /src/gallium/drivers/v3d/v3d_cl.h | |
parent | 5ffb8b1716f9282a4f5326ba3768d887601c3688 (diff) |
v3d: generate packet unpack functions
These were not being compiled because of the lack of __gen_unpack_address.
v2:
- Shift raw address correctly (Eric).
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_cl.h')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_cl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_cl.h b/src/gallium/drivers/v3d/v3d_cl.h index 0b3058f4fdd..271d407132a 100644 --- a/src/gallium/drivers/v3d/v3d_cl.h +++ b/src/gallium/drivers/v3d/v3d_cl.h @@ -28,6 +28,7 @@ #include "util/u_math.h" #include "util/macros.h" +#include "broadcom/cle/v3d_packet_helpers.h" struct v3d_bo; struct v3d_job; @@ -52,6 +53,15 @@ static inline void cl_pack_emit_reloc(struct v3d_cl *cl, const struct v3d_cl_rel #define __gen_address_offset(reloc) (((reloc)->bo ? (reloc)->bo->offset : 0) + \ (reloc)->offset) #define __gen_emit_reloc cl_pack_emit_reloc +#define __gen_unpack_address(cl, s, e) __unpack_address(cl, s, e) + +static inline struct v3d_cl_reloc +__unpack_address(const uint8_t *cl, uint32_t s, uint32_t e) +{ + struct v3d_cl_reloc reloc = + { NULL, __gen_unpack_uint(cl, s, e) << (31 - (e - s)) }; + return reloc; +} struct v3d_cl { void *base; |