turnip: remove dead tu_minify/typed_memcpy functions
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>
This commit is contained in:
committed by
Marge Bot
parent
99372547be
commit
2ca1ccc18d
@@ -427,7 +427,7 @@ tu_image_view_init(struct tu_image_view *iview,
|
||||
break;
|
||||
case VK_IMAGE_TYPE_3D:
|
||||
assert(range->baseArrayLayer + tu_get_layerCount(image, range) <=
|
||||
tu_minify(image->extent.depth, range->baseMipLevel));
|
||||
u_minify(image->extent.depth, range->baseMipLevel));
|
||||
break;
|
||||
default:
|
||||
unreachable("bad VkImageType");
|
||||
|
||||
@@ -111,25 +111,10 @@ typedef uint32_t xcb_window_t;
|
||||
|
||||
#define tu_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
|
||||
|
||||
static inline uint32_t
|
||||
tu_minify(uint32_t n, uint32_t levels)
|
||||
{
|
||||
if (unlikely(n == 0))
|
||||
return 0;
|
||||
else
|
||||
return MAX2(n >> levels, 1);
|
||||
}
|
||||
|
||||
#define for_each_bit(b, dword) \
|
||||
for (uint32_t __dword = (dword); \
|
||||
(b) = __builtin_ffs(__dword) - 1, __dword; __dword &= ~(1 << (b)))
|
||||
|
||||
#define typed_memcpy(dest, src, count) \
|
||||
({ \
|
||||
STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
|
||||
memcpy((dest), (src), (count) * sizeof(*(src))); \
|
||||
})
|
||||
|
||||
#define COND(bool, val) ((bool) ? (val) : 0)
|
||||
#define BIT(bit) (1u << (bit))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user