From 0bd707ba1750e0dde138ead0fd964fe5dc843aae Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 17 Feb 2021 17:09:00 -0800 Subject: [PATCH] lavepipe: some misc msvc fixes drop some headers, get rid of printflike, drop the __builtin_ffs Reviewed-by: Jesse Natalie Part-of: --- src/gallium/frontends/lavapipe/lvp_private.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h index bef83981a83..1dd90d75128 100644 --- a/src/gallium/frontends/lavapipe/lvp_private.h +++ b/src/gallium/frontends/lavapipe/lvp_private.h @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include @@ -67,7 +65,11 @@ extern "C" { #define MAX_PUSH_CONSTANTS_SIZE 128 #define MAX_PUSH_DESCRIPTORS 32 +#ifdef _WIN32 +#define lvp_printflike(a, b) +#else #define lvp_printflike(a, b) __attribute__((__format__(__printf__, a, b))) +#endif int lvp_get_instance_entrypoint_index(const char *name); int lvp_get_device_entrypoint_index(const char *name); @@ -198,7 +200,7 @@ mesa_to_vk_shader_stage(gl_shader_stage mesa_stage) #define lvp_foreach_stage(stage, stage_bits) \ for (gl_shader_stage stage, \ __tmp = (gl_shader_stage)((stage_bits) & LVP_STAGE_MASK); \ - stage = __builtin_ffs(__tmp) - 1, __tmp; \ + stage = ffs(__tmp) - 1, __tmp; \ __tmp &= ~(1 << (stage))) struct lvp_physical_device {