turnip: remove dead tu_minify/typed_memcpy functions
authorJonathan Marek <jonathan@marek.ca>
Thu, 9 Jul 2020 23:23:23 +0000 (19:23 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Aug 2020 13:42:02 +0000 (13:42 +0000)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6304>

src/freedreno/vulkan/tu_image.c
src/freedreno/vulkan/tu_private.h

index 18c75e9f19f39e92ce17e26d94730c58afb39715..6f2dc0421d064013b339d0ff90814e88e04e63a8 100644 (file)
@@ -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");
index 28ba3ec84c17f3db3573fb059a848008502f1b9e..7470d69b868a0a2b7224e236f2b465826d6f19ee 100644 (file)
@@ -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))