From: Grazvydas Ignotas Date: Wed, 11 Jan 2017 01:31:24 +0000 (+0200) Subject: radv: remove some unused macros and functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb89d19dbbaac301534e7a543bb9bcd740b05008;p=mesa.git radv: remove some unused macros and functions These seem unlikely to be used. Also remove irrelevant comment about SKL. v2: forgot to rebase on master Signed-off-by: Grazvydas Ignotas --- diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index ebda49dc5be..fc3cbca8bbd 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -79,8 +79,7 @@ typedef uint32_t xcb_window_t; #define MAX_SCISSORS 16 #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 MAX_SAMPLES_LOG2 4 #define NUM_META_FS_KEYS 11 #define NUM_DEPTH_CLEAR_PIPELINES 3 @@ -112,7 +111,6 @@ enum { RADV_DEBUG_UNSAFE_MATH = 0x80, }; -#define radv_noreturn __attribute__((__noreturn__)) #define radv_printflike(a, b) __attribute__((__format__(__printf__, a, b))) static inline uint32_t @@ -248,9 +246,6 @@ void radv_loge_v(const char *format, va_list va); #define radv_assert(x) #endif -void radv_abortf(const char *format, ...) radv_noreturn radv_printflike(1, 2); -void radv_abortfv(const char *format, va_list va) radv_noreturn; - #define stub_return(v) \ do { \ radv_finishme("stub %s", __func__); \ @@ -1328,12 +1323,4 @@ RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_render_pass, VkRenderPass) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_sampler, VkSampler) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_shader_module, VkShaderModule) -#define RADV_DEFINE_STRUCT_CASTS(__radv_type, __VkType) \ - \ - static inline const __VkType * \ - __radv_type ## _to_ ## __VkType(const struct __radv_type *__radv_obj) \ - { \ - return (const __VkType *) __radv_obj; \ - } - #endif /* RADV_PRIVATE_H */ diff --git a/src/amd/vulkan/radv_util.c b/src/amd/vulkan/radv_util.c index 8c7a948bc95..c642bb7539a 100644 --- a/src/amd/vulkan/radv_util.c +++ b/src/amd/vulkan/radv_util.c @@ -65,25 +65,6 @@ void radv_printflike(3, 4) fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer); } -void radv_noreturn radv_printflike(1, 2) - radv_abortf(const char *format, ...) -{ - va_list va; - - va_start(va, format); - radv_abortfv(format, va); - va_end(va); -} - -void radv_noreturn -radv_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, ...) {