v3d: Move v3d_X(..) to src/broadcom/common

It will be re-used by libbroadcom_perfcntrs

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32277>
This commit is contained in:
Christian Gmeiner 2024-10-28 14:20:34 +01:00 committed by Marge Bot
parent 787da655d1
commit 3b4636c769
2 changed files with 16 additions and 16 deletions

View file

@ -35,6 +35,22 @@
# include "xf86drm.h"
#endif
/* Helper to call hw ver specific functions */
#define v3d_X(devinfo, thing) ({ \
__typeof(&v3d42_##thing) v3d_X_thing; \
switch (devinfo->ver) { \
case 42: \
v3d_X_thing = &v3d42_##thing; \
break; \
case 71: \
v3d_X_thing = &v3d71_##thing; \
break; \
default: \
unreachable("Unsupported hardware generation"); \
} \
v3d_X_thing; \
})
uint32_t
v3d_csd_choose_workgroups_per_supergroup(struct v3d_device_info *devinfo,
bool has_subgroups,

View file

@ -879,22 +879,6 @@ void v3d_disk_cache_store(struct v3d_context *v3d,
uint32_t qpu_size);
#endif /* ENABLE_SHADER_CACHE */
/* Helper to call hw ver specific functions */
#define v3d_X(devinfo, thing) ({ \
__typeof(&v3d42_##thing) v3d_X_thing; \
switch (devinfo->ver) { \
case 42: \
v3d_X_thing = &v3d42_##thing; \
break; \
case 71: \
v3d_X_thing = &v3d71_##thing; \
break; \
default: \
unreachable("Unsupported hardware generation"); \
} \
v3d_X_thing; \
})
#ifdef v3dX
# include "v3dx_context.h"
#else