[Mesa-dev] [PATCH] anv: remove some unused macros and functions

Grazvydas Ignotas notasas at gmail.com
Fri Jan 13 23:10:08 UTC 2017


VK_ICD_WSI_PLATFORM_MAX is used, but a duplicate from wsi_common.h .

Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
---
no commit access
requested by Emil: 
https://lists.freedesktop.org/archives/mesa-dev/2017-January/140733.html

 src/intel/vulkan/anv_private.h | 15 ---------------
 src/intel/vulkan/anv_util.c    | 19 -------------------
 2 files changed, 34 deletions(-)

diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2342fcb..afa5cbb 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -95,9 +95,7 @@ extern "C" {
 #define MAX_PUSH_CONSTANTS_SIZE 128
 #define MAX_DYNAMIC_BUFFERS 16
 #define MAX_IMAGES 8
-#define MAX_SAMPLES_LOG2 4 /* SKL supports 16 samples */
 
-#define anv_noreturn __attribute__((__noreturn__))
 #define anv_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
 
 static inline uint32_t
@@ -243,9 +241,6 @@ void anv_loge_v(const char *format, va_list va);
 #define anv_validate if (0)
 #endif
 
-void anv_abortf(const char *format, ...) anv_noreturn anv_printflike(1, 2);
-void anv_abortfv(const char *format, va_list va) anv_noreturn;
-
 #define stub_return(v) \
    do { \
       anv_finishme("stub %s", __func__); \
@@ -495,8 +490,6 @@ struct anv_bo *anv_scratch_pool_alloc(struct anv_device *device,
 
 extern struct anv_dispatch_table dtable;
 
-#define VK_ICD_WSI_PLATFORM_MAX 5
-
 struct anv_physical_device {
     VK_LOADER_DATA                              _loader_data;
 
@@ -1893,14 +1886,6 @@ ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_render_pass, VkRenderPass)
 ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_sampler, VkSampler)
 ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_shader_module, VkShaderModule)
 
-#define ANV_DEFINE_STRUCT_CASTS(__anv_type, __VkType) \
-   \
-   static inline const __VkType * \
-   __anv_type ## _to_ ## __VkType(const struct __anv_type *__anv_obj) \
-   { \
-      return (const __VkType *) __anv_obj; \
-   }
-
 /* Gen-specific function declarations */
 #ifdef genX
 #  include "anv_genX.h"
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 2972cd2..6408ac8 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -63,25 +63,6 @@ __anv_finishme(const char *file, int line, const char *format, ...)
    fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer);
 }
 
-void anv_noreturn anv_printflike(1, 2)
-anv_abortf(const char *format, ...)
-{
-   va_list va;
-
-   va_start(va, format);
-   anv_abortfv(format, va);
-   va_end(va);
-}
-
-void anv_noreturn
-anv_abortfv(const char *format, va_list va)
-{
-   fprintf(stderr, "vk: error: ");
-   vfprintf(stderr, format, va);
-   fprintf(stderr, "\n");
-   abort();
-}
-
 VkResult
 __vk_errorf(VkResult error, const char *file, int line, const char *format, ...)
 {
-- 
2.7.4



More information about the mesa-dev mailing list