wine/port.h is required for ffs().
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d8/buffer.c | 1 + dlls/d3d8/d3d8_main.c | 1 + dlls/d3d8/directx.c | 1 + dlls/d3d8/shader.c | 1 + dlls/d3d8/surface.c | 1 + dlls/d3d8/swapchain.c | 1 + dlls/d3d8/texture.c | 1 + dlls/d3d8/vertexdeclaration.c | 6 +----- dlls/d3d8/volume.c | 1 + dlls/d3d9/buffer.c | 1 + dlls/d3d9/d3d9_main.c | 1 + dlls/d3d9/directx.c | 1 + dlls/d3d9/query.c | 1 + dlls/d3d9/shader.c | 1 + dlls/d3d9/stateblock.c | 1 + dlls/d3d9/surface.c | 1 + dlls/d3d9/swapchain.c | 1 + dlls/d3d9/texture.c | 1 + dlls/d3d9/vertexdeclaration.c | 1 + dlls/d3d9/volume.c | 1 + dlls/wined3d/wined3d_private.h | 7 ------- include/wine/wined3d.h | 7 +++++++ 22 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/dlls/d3d8/buffer.c b/dlls/d3d8/buffer.c index 3b980003b310..0a6767be70ed 100644 --- a/dlls/d3d8/buffer.c +++ b/dlls/d3d8/buffer.c @@ -17,6 +17,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index 92c5032acbeb..a6c67008ed5a 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -20,6 +20,7 @@ */
#include "config.h" +#include "wine/port.h" #include "initguid.h" #include "d3d8_private.h" #include "wine/debug.h" diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index d97882705b58..09188cc2aef7 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -21,6 +21,7 @@ */
#include "config.h" +#include "wine/port.h"
#include <stdarg.h>
diff --git a/dlls/d3d8/shader.c b/dlls/d3d8/shader.c index 2a4fbde88c09..6c166330bfe9 100644 --- a/dlls/d3d8/shader.c +++ b/dlls/d3d8/shader.c @@ -18,6 +18,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index 7f90389905af..0d8793788d75 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -19,6 +19,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index c9abfffffda3..186e3cd8439c 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -19,6 +19,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/texture.c b/dlls/d3d8/texture.c index ccbf60e05af1..6f17e9da5fd4 100644 --- a/dlls/d3d8/texture.c +++ b/dlls/d3d8/texture.c @@ -17,6 +17,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/vertexdeclaration.c b/dlls/d3d8/vertexdeclaration.c index 0cae3cd8c6c0..709e04bace40 100644 --- a/dlls/d3d8/vertexdeclaration.c +++ b/dlls/d3d8/vertexdeclaration.c @@ -1,6 +1,4 @@ /* - * IDirect3DVertexDeclaration8 implementation - * * Copyright 2007 Henri Verbeet * * This library is free software; you can redistribute it and/or @@ -18,10 +16,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-/* IDirect3DVertexDeclaration8 is internal to our implementation. - * It's not visible in the API. */ - #include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c index 29eab6a69001..00dd78a533e2 100644 --- a/dlls/d3d8/volume.c +++ b/dlls/d3d8/volume.c @@ -19,6 +19,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d8_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d8); diff --git a/dlls/d3d9/buffer.c b/dlls/d3d9/buffer.c index 840d7e95ea4f..b6cd646dee2f 100644 --- a/dlls/d3d9/buffer.c +++ b/dlls/d3d9/buffer.c @@ -19,6 +19,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c index c23fa54d99b5..bd0524b9da2a 100644 --- a/dlls/d3d9/d3d9_main.c +++ b/dlls/d3d9/d3d9_main.c @@ -22,6 +22,7 @@ */
#include "config.h" +#include "wine/port.h" #include "initguid.h" #include "d3d9_private.h"
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index 3f9c188f3e7f..eab114d19c62 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -20,6 +20,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/query.c b/dlls/d3d9/query.c index 12ff95b5a060..49a8a12d415e 100644 --- a/dlls/d3d9/query.c +++ b/dlls/d3d9/query.c @@ -21,6 +21,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/shader.c b/dlls/d3d9/shader.c index bc347386b85d..549350852a15 100644 --- a/dlls/d3d9/shader.c +++ b/dlls/d3d9/shader.c @@ -18,6 +18,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/stateblock.c b/dlls/d3d9/stateblock.c index 6f39488fc115..8431ef770029 100644 --- a/dlls/d3d9/stateblock.c +++ b/dlls/d3d9/stateblock.c @@ -21,6 +21,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index 7d4d93b5e8fe..ded7dc4f4906 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -20,6 +20,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index 00ead0fc3e3e..46da32e92f50 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -21,6 +21,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c index c73cbc0d5231..8dc1ceea6982 100644 --- a/dlls/d3d9/texture.c +++ b/dlls/d3d9/texture.c @@ -19,6 +19,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c index 5075309638f3..b64452552384 100644 --- a/dlls/d3d9/vertexdeclaration.c +++ b/dlls/d3d9/vertexdeclaration.c @@ -20,6 +20,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c index cb0485cd7f49..7bf12570a891 100644 --- a/dlls/d3d9/volume.c +++ b/dlls/d3d9/volume.c @@ -20,6 +20,7 @@ */
#include "config.h" +#include "wine/port.h" #include "d3d9_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d9); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0df3f2ab2a5e..7b265f366285 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4582,13 +4582,6 @@ static inline BOOL is_rasterization_disabled(const struct wined3d_shader *geomet && geometry_shader->u.gs.so_desc.rasterizer_stream_idx == WINED3D_NO_RASTERIZER_STREAM; }
-static inline int wined3d_bit_scan(unsigned int *x) -{ - int bit_offset = ffs(*x) - 1; - *x ^= 1u << bit_offset; - return bit_offset; -} - static inline DWORD wined3d_extract_bits(const DWORD *bitstream, unsigned int offset, unsigned int count) { diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index b0b1abc508e6..2a8afe8fca6f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2782,6 +2782,13 @@ static inline unsigned int wined3d_log2i(unsigned int x) #endif }
+static inline int wined3d_bit_scan(unsigned int *x) +{ + int bit_offset = ffs(*x) - 1; + *x ^= 1u << bit_offset; + return bit_offset; +} + static inline void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back) {