#include <string.h>
#include <assert.h>
-struct _mesa_glsl_parse_state;
-struct glsl_symbol_table;
-
#ifdef __cplusplus
extern "C" {
#endif
+struct _mesa_glsl_parse_state;
+struct glsl_symbol_table;
+
extern void
_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state);
#ifndef IR_UNIFORM_H
#define IR_UNIFORM_H
-#ifdef __cplusplus
-extern "C" {
-#endif
/* stdbool.h is necessary because this file is included in both C and C++ code.
*/
#include <stdbool.h>
+
#include "program/prog_parameter.h" /* For union gl_constant_value. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum gl_uniform_driver_format {
uniform_native = 0, /**< Store data in the native format. */
uniform_int_float, /**< Store integer data as floats. */
#ifndef _GLAPI_H
#define _GLAPI_H
+#include "glapi/glthread.h"
+
+
#ifdef __cplusplus
extern "C" {
#endif
+
#ifdef _GLAPI_NO_EXPORTS
# define _GLAPI_EXPORT
#else /* _GLAPI_NO_EXPORTS */
#define _glapi_Context _mglapi_Context
#endif
-#include "glapi/glthread.h"
-
typedef void (*_glapi_proc)(void);
struct _glapi_table;
_GLAPI_EXPORT void
_glapi_set_warning_func(_glapi_proc func);
+
#ifdef __cplusplus
}
#endif
#include "mapi/u_thread.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name)
#define _glthread_INIT_MUTEX(name) u_mutex_init(name)
#define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name)
typedef struct u_tsd _glthread_TSD;
typedef u_mutex _glthread_Mutex;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GLTHREAD_H */
#include "u_compiler.h"
-#if defined(PTHREADS) || defined(WIN32)
+#if defined(PTHREADS)
+#include <pthread.h> /* POSIX threads headers */
+#endif
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#if defined(PTHREADS) || defined(_WIN32)
#ifndef THREADS
#define THREADS
#endif
#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*
* POSIX threads. This should be your choice in the Unix world
* whenever possible. When building with POSIX threads, be sure
* proper compiling for MT-safe libc etc.
*/
#if defined(PTHREADS)
-#include <pthread.h> /* POSIX threads headers */
struct u_tsd {
pthread_key_t key;
* used!
*/
#ifdef WIN32
-#include <windows.h>
struct u_tsd {
DWORD key;
void
u_tsd_set(struct u_tsd *tsd, void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _U_THREAD_H_ */
#include "mtypes.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct _glapi_table;
/*@}*/
+#ifdef __cplusplus
+}
+#endif
+
#endif /* CONTEXT_H */
#include "main/mtypes.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* for GLSL */
#include "program/prog_parameter.h"
-#ifdef __cplusplus
-}
-#endif
-
#endif /* CORE_H */
#include <GL/gl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* OpenGL doesn't have GL_UNSIGNED_BYTE_4_4, so we must define our own type
* for GL_LUMINANCE4_ALPHA4. */
#define MESA_UNSIGNED_BYTE_4_4 (GL_UNSIGNED_BYTE<<1)
_mesa_format_matches_format_and_type(gl_format gl_format,
GLenum format, GLenum type);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* FORMATS_H */
#include "GL/glext.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* GL_FIXED is defined in glext.h version 64 but these typedefs aren't (yet).
*/
#define GLX_DONT_CARE 0xFFFFFFFF
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GLHEADER_H */
#include "main/formats.h" /* MESA_FORMAT_COUNT */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* Stencil buffer data type.
*/
+#ifdef __cplusplus
+}
+#endif
+
#endif /* MTYPES_H */
#include "glheader.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct _glapi_table;
struct gl_context;
struct gl_shader_program;
extern GLuint GLAPIENTRY
_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* SHADERAPI_H */
#include "main/mtypes.h"
#include "program/ir_to_mesa.h"
+
#ifdef __cplusplus
extern "C" {
#endif
+
+
/**
* Internal functions
*/
#ifndef _SIMPLE_LIST_H
#define _SIMPLE_LIST_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct simple_node {
struct simple_node *next;
struct simple_node *prev;
#define foreach_s(ptr, t, list) \
for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next)
+#ifdef __cplusplus
+}
+#endif
+
#endif
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+
#include <stdlib.h>
+
#include "main/core.h"
#include "main/context.h"
#include "ir.h"
#include "program/hash_table.h"
#include "../glsl/program.h"
#include "../glsl/ir_uniform.h"
-
-extern "C" {
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "uniforms.h"
-}
+
extern "C" void GLAPIENTRY
_mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
#include "../glsl/glsl_types.h"
#include "../glsl/ir_uniform.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct gl_program;
struct _glapi_table;
}
/*@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* UNIFORMS_H */
#include "main/glheader.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* \name Symbolic names to some of the entries in the matrix
*
/*@}*/
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <limits.h>
#include <assert.h>
-struct hash_table;
struct string_to_uint_map;
-typedef unsigned (*hash_func_t)(const void *key);
-typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
-
#ifdef __cplusplus
extern "C" {
#endif
+struct hash_table;
+
+typedef unsigned (*hash_func_t)(const void *key);
+typedef int (*hash_compare_func_t)(const void *key1, const void *key2);
+
/**
* Hash table constructor
*
* DEALINGS IN THE SOFTWARE.
*/
-#include "main/glheader.h"
+#pragma once
-struct gl_context;
-struct gl_shader;
-struct gl_shader_program;
+#include "main/glheader.h"
#ifdef __cplusplus
extern "C" {
#endif
+struct gl_context;
+struct gl_shader;
+struct gl_shader_program;
+
void _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *sh);
void _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
GLboolean _mesa_ir_compile_shader(struct gl_context *ctx, struct gl_shader *shader);
GLboolean _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
-#ifdef __cplusplus
-}
-
void
_mesa_generate_parameters_list_for_uniforms(struct gl_shader_program
*shader_program,
struct gl_shader_program *shader_program,
struct gl_program_parameter_list *params);
+#ifdef __cplusplus
+}
#endif
#include "prog_statevars.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/**
* Program parameter flags
*/
gl_register_file type);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PROG_PARAMETER_H */
#ifndef PROG_STATEVARS_H
#define PROG_STATEVARS_H
+
#include "main/glheader.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct gl_context;
struct gl_program_parameter_list;
_mesa_load_tracked_matrices(struct gl_context *ctx);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PROG_STATEVARS_H */