Make the pipe headers C++ friendly.
This commit is contained in:
@@ -31,6 +31,11 @@
|
|||||||
#include "p_state.h"
|
#include "p_state.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct pipe_state_cache;
|
struct pipe_state_cache;
|
||||||
|
|
||||||
/* Opaque driver handles:
|
/* Opaque driver handles:
|
||||||
@@ -226,4 +231,9 @@ struct pipe_context {
|
|||||||
unsigned flags );
|
unsigned flags );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* PIPE_CONTEXT_H */
|
#endif /* PIPE_CONTEXT_H */
|
||||||
|
@@ -30,6 +30,10 @@
|
|||||||
|
|
||||||
#include "p_format.h"
|
#include "p_format.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PIPE_BLENDFACTOR_ONE 0x1
|
#define PIPE_BLENDFACTOR_ONE 0x1
|
||||||
#define PIPE_BLENDFACTOR_SRC_COLOR 0x2
|
#define PIPE_BLENDFACTOR_SRC_COLOR 0x2
|
||||||
#define PIPE_BLENDFACTOR_SRC_ALPHA 0x3
|
#define PIPE_BLENDFACTOR_SRC_ALPHA 0x3
|
||||||
@@ -267,4 +271,8 @@ enum pipe_texture_target {
|
|||||||
#define PIPE_CAP_MAX_TEXTURE_LOD_BIAS 19
|
#define PIPE_CAP_MAX_TEXTURE_LOD_BIAS 19
|
||||||
#define PIPE_CAP_BITMAP_TEXCOORD_BIAS 20
|
#define PIPE_CAP_BITMAP_TEXCOORD_BIAS 20
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,6 +33,10 @@
|
|||||||
#include "p_compiler.h"
|
#include "p_compiler.h"
|
||||||
#include "p_debug.h"
|
#include "p_debug.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The PIPE_FORMAT is a 32-bit wide bitfield that encodes all the information
|
* The PIPE_FORMAT is a 32-bit wide bitfield that encodes all the information
|
||||||
* needed to uniquely describe a pixel format.
|
* needed to uniquely describe a pixel format.
|
||||||
@@ -418,4 +422,8 @@ static INLINE uint pf_get_size( enum pipe_format format ) {
|
|||||||
return pf_get_bits(format) / 8;
|
return pf_get_bits(format) / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,6 +33,11 @@
|
|||||||
#include "p_winsys.h"
|
#include "p_winsys.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static INLINE void *
|
static INLINE void *
|
||||||
pipe_surface_map(struct pipe_surface *surface)
|
pipe_surface_map(struct pipe_surface *surface)
|
||||||
{
|
{
|
||||||
@@ -109,4 +114,8 @@ pipe_texture_reference(struct pipe_context *pipe, struct pipe_texture **ptr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* P_INLINES_H */
|
#endif /* P_INLINES_H */
|
||||||
|
@@ -30,6 +30,10 @@
|
|||||||
|
|
||||||
#include "p_compiler.h"
|
#include "p_compiler.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
static INLINE intptr_t
|
static INLINE intptr_t
|
||||||
pointer_to_intptr( const void *p )
|
pointer_to_intptr( const void *p )
|
||||||
{
|
{
|
||||||
@@ -84,4 +88,8 @@ align_pointer( const void *unaligned, uintptr_t alignment )
|
|||||||
return uintptr_to_pointer( aligned );
|
return uintptr_to_pointer( aligned );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* P_POINTER_H */
|
#endif /* P_POINTER_H */
|
||||||
|
@@ -42,6 +42,12 @@
|
|||||||
#include "p_defines.h"
|
#include "p_defines.h"
|
||||||
#include "p_format.h"
|
#include "p_format.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation limits
|
* Implementation limits
|
||||||
*/
|
*/
|
||||||
@@ -326,4 +332,8 @@ struct pipe_vertex_element
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -34,13 +34,13 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C" {
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
|
||||||
void * __stdcall
|
void * __stdcall
|
||||||
EngAllocMem(
|
EngAllocMem(
|
||||||
unsigned long Flags,
|
unsigned long Flags,
|
||||||
@@ -51,10 +51,6 @@ void __stdcall
|
|||||||
EngFreeMem(
|
EngFreeMem(
|
||||||
void *Mem );
|
void *Mem );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static INLINE void *
|
static INLINE void *
|
||||||
MALLOC( unsigned size )
|
MALLOC( unsigned size )
|
||||||
{
|
{
|
||||||
@@ -379,4 +375,8 @@ extern void pipe_copy_rect(ubyte * dst, unsigned cpp, unsigned dst_pitch,
|
|||||||
int src_pitch, unsigned src_x, int src_y);
|
int src_pitch, unsigned src_x, int src_y);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -25,12 +25,6 @@
|
|||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef P_WINSYS_H
|
|
||||||
#define P_WINSYS_H
|
|
||||||
|
|
||||||
|
|
||||||
#include "p_format.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
* This is the interface that Gallium3D requires any window system
|
* This is the interface that Gallium3D requires any window system
|
||||||
@@ -38,6 +32,17 @@
|
|||||||
* which is public.
|
* which is public.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef P_WINSYS_H
|
||||||
|
#define P_WINSYS_H
|
||||||
|
|
||||||
|
|
||||||
|
#include "p_format.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/** Opaque type */
|
/** Opaque type */
|
||||||
struct pipe_fence_handle;
|
struct pipe_fence_handle;
|
||||||
@@ -156,5 +161,8 @@ struct pipe_winsys
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* P_WINSYS_H */
|
#endif /* P_WINSYS_H */
|
||||||
|
Reference in New Issue
Block a user