wined3d: Move wined3d_bit_scan() to public header.
wine/port.h is required for ffs(). Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
38fb14a688
commit
b51bc84338
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "initguid.h"
|
||||
#include "d3d8_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d8);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "initguid.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
#include "d3d9_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#ifndef __WINE_WINED3D_H
|
||||
#define __WINE_WINED3D_H
|
||||
|
||||
#ifndef __WINE_CONFIG_H
|
||||
# error You must include config.h to use this header
|
||||
#ifndef __WINE_WINE_PORT_H
|
||||
# error You must include wine/port.h to use this header
|
||||
#endif
|
||||
|
||||
#include "wine/list.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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue