diff --git a/src/broadcom/vulkan/v3dv_cl.h b/src/broadcom/vulkan/v3dv_cl.h index 8d1066843e2..68d5acd455b 100644 --- a/src/broadcom/vulkan/v3dv_cl.h +++ b/src/broadcom/vulkan/v3dv_cl.h @@ -46,6 +46,16 @@ struct v3dv_cl_reloc { uint32_t offset; }; +static inline void +pack_emit_reloc(void *cl, const void *reloc) {} + +#define __gen_user_data struct v3dv_cl +#define __gen_address_type struct v3dv_cl_reloc +#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) + struct v3dv_cl { void *base; struct v3dv_job *job; diff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h index 17e1b8bdb48..33883b398b3 100644 --- a/src/broadcom/vulkan/v3dv_private.h +++ b/src/broadcom/vulkan/v3dv_private.h @@ -75,24 +75,12 @@ #include "drm-uapi/v3d_drm.h" -/* FIXME: hooks for the packet definition functions. */ -static inline void -pack_emit_reloc(void *cl, const void *reloc) {} - -#define __gen_user_data struct v3dv_cl -#define __gen_address_type struct v3dv_cl_reloc -#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) -#include "v3dv_cl.h" - #include "vk_alloc.h" #include "simulator/v3d_simulator.h" -#include "wsi_common.h" +#include "v3dv_cl.h" -#include "broadcom/cle/v3dx_pack.h" +#include "wsi_common.h" /* A non-fatal assert. Useful for debugging. */ #ifdef DEBUG diff --git a/src/broadcom/vulkan/v3dv_uniforms.c b/src/broadcom/vulkan/v3dv_uniforms.c index 43155da4797..e51ece3e161 100644 --- a/src/broadcom/vulkan/v3dv_uniforms.c +++ b/src/broadcom/vulkan/v3dv_uniforms.c @@ -28,6 +28,9 @@ #include "v3dv_private.h" #include "vk_format_info.h" +#include "broadcom/common/v3d_macros.h" +#include "broadcom/cle/v3dx_pack.h" + /* Our Vulkan resource indices represent indices in descriptor maps which * include all shader stages, so we need to size the arrays below * accordingly. For now we only support a maximum of 2 stages for VS and