aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-07-16 08:59:33 +0200
committermarha <marha@users.sourceforge.net>2013-07-16 08:59:33 +0200
commitd00d82f6017166fdeb927320ce4c656cb99319fd (patch)
tree75d388ec743971c4bdcc85b639f8bc35458b27e0 /mesalib/src/mesa/main
parent707c146a74f6ff862be3ebb2470d1f31e29dd907 (diff)
parent06f4de23ace4de1fd628c37891214f0a4ecb77db (diff)
downloadvcxsrv-d00d82f6017166fdeb927320ce4c656cb99319fd.tar.gz
vcxsrv-d00d82f6017166fdeb927320ce4c656cb99319fd.tar.bz2
vcxsrv-d00d82f6017166fdeb927320ce4c656cb99319fd.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libxcb xcb-proto mesa xkbcomp git update 16 Jul 2013 Conflicts: mesalib/src/glsl/glsl_symbol_table.cpp
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/enable.c21
-rw-r--r--mesalib/src/mesa/main/errors.c2
-rw-r--r--mesalib/src/mesa/main/errors.h2
-rw-r--r--mesalib/src/mesa/main/getstring.c2
-rw-r--r--mesalib/src/mesa/main/hash_table.c4
-rw-r--r--mesalib/src/mesa/main/mipmap.c4
-rw-r--r--mesalib/src/mesa/main/mtypes.h32
-rw-r--r--mesalib/src/mesa/main/multisample.c5
-rw-r--r--mesalib/src/mesa/main/set.c4
-rw-r--r--mesalib/src/mesa/main/texparam.c2
-rw-r--r--mesalib/src/mesa/main/texstore.c2
-rw-r--r--mesalib/src/mesa/main/uniforms.c2
12 files changed, 45 insertions, 37 deletions
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index 5c72b3cd7..21e593117 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -1395,40 +1395,41 @@ _mesa_IsEnabled( GLenum cap )
case GL_VERTEX_ARRAY:
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled;
case GL_NORMAL_ARRAY:
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled;
case GL_COLOR_ARRAY:
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled;
case GL_INDEX_ARRAY:
if (ctx->API != API_OPENGL_COMPAT)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled != 0);
+ return ctx->Array.ArrayObj->
+ VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled;
case GL_TEXTURE_COORD_ARRAY:
if (ctx->API != API_OPENGL_COMPAT && ctx->API != API_OPENGLES)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)]
- .Enabled != 0);
+ return ctx->Array.ArrayObj->
+ VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled;
case GL_EDGE_FLAG_ARRAY:
if (ctx->API != API_OPENGL_COMPAT)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled;
case GL_FOG_COORDINATE_ARRAY_EXT:
if (ctx->API != API_OPENGL_COMPAT)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled;
case GL_SECONDARY_COLOR_ARRAY_EXT:
if (ctx->API != API_OPENGL_COMPAT)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled;
case GL_POINT_SIZE_ARRAY_OES:
if (ctx->API != API_OPENGLES)
goto invalid_enum_error;
- return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled != 0);
+ return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled;
/* GL_ARB_texture_cube_map */
case GL_TEXTURE_CUBE_MAP_ARB:
diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c
index 465420766..5a0758d0b 100644
--- a/mesalib/src/mesa/main/errors.c
+++ b/mesalib/src/mesa/main/errors.c
@@ -659,7 +659,7 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type,
}
void GLAPIENTRY
-_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, GLvoid *userParam)
+_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback, const void *userParam)
{
GET_CURRENT_CONTEXT(ctx);
ctx->Debug.Callback = callback;
diff --git a/mesalib/src/mesa/main/errors.h b/mesalib/src/mesa/main/errors.h
index 4b376fb60..5b4f36f55 100644
--- a/mesalib/src/mesa/main/errors.h
+++ b/mesalib/src/mesa/main/errors.h
@@ -101,7 +101,7 @@ _mesa_DebugMessageControlARB(GLenum source, GLenum type, GLenum severity,
GLboolean enabled);
void GLAPIENTRY
_mesa_DebugMessageCallbackARB(GLDEBUGPROCARB callback,
- GLvoid *userParam);
+ const void *userParam);
#ifdef __cplusplus
}
diff --git a/mesalib/src/mesa/main/getstring.c b/mesalib/src/mesa/main/getstring.c
index 39fd260dc..0e075427f 100644
--- a/mesalib/src/mesa/main/getstring.c
+++ b/mesalib/src/mesa/main/getstring.c
@@ -262,7 +262,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
case GL_DEBUG_CALLBACK_USER_PARAM_ARB:
if (!_mesa_is_desktop_gl(ctx))
goto invalid_pname;
- *params = ctx->Debug.CallbackData;
+ *params = (GLvoid *) ctx->Debug.CallbackData;
break;
default:
goto invalid_pname;
diff --git a/mesalib/src/mesa/main/hash_table.c b/mesalib/src/mesa/main/hash_table.c
index af0510da1..008b4cdbc 100644
--- a/mesalib/src/mesa/main/hash_table.c
+++ b/mesalib/src/mesa/main/hash_table.c
@@ -110,8 +110,8 @@ entry_is_present(const struct hash_table *ht, struct hash_entry *entry)
struct hash_table *
_mesa_hash_table_create(void *mem_ctx,
- bool key_equals_function(const void *a,
- const void *b))
+ bool (*key_equals_function)(const void *a,
+ const void *b))
{
struct hash_table *ht;
diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c
index f1e12e8cf..edf725721 100644
--- a/mesalib/src/mesa/main/mipmap.c
+++ b/mesalib/src/mesa/main/mipmap.c
@@ -1885,7 +1885,7 @@ generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target,
const struct gl_texture_image *srcImage,
GLuint maxLevel)
{
- GLint level;
+ GLuint level;
GLenum datatype;
GLuint comps;
@@ -2017,7 +2017,7 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
struct gl_texture_image *srcImage,
GLuint maxLevel)
{
- GLint level;
+ GLuint level;
gl_format temp_format;
GLint components;
GLuint temp_src_stride; /* in bytes */
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 2f7cce7ba..ea139ea58 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -272,8 +272,6 @@ typedef enum
/*@}*/
-/*********************************************/
-
/**
* Determine if the given gl_varying_slot appears in the fragment shader.
*/
@@ -673,7 +671,7 @@ struct gl_colorbuffer_attrib
GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */
GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
- GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */
+ GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */
};
@@ -874,9 +872,8 @@ struct gl_multisample_attrib
/* ARB_texture_multisample / GL3.2 additions */
GLboolean SampleMask;
- GLbitfield SampleMaskValue; /* GL spec defines this as an array but >32x MSAA is
- * madness
- */
+ /** The GL spec defines this as an array but >32x MSAA is madness */
+ GLbitfield SampleMaskValue;
};
@@ -1103,8 +1100,8 @@ struct gl_texture_image
GLuint Face;
/** GL_ARB_texture_multisample */
- GLuint NumSamples; /**< Sample count, or 0 for non-multisample */
- GLboolean FixedSampleLocations; /**< Same sample locations for all pixels? */
+ GLuint NumSamples; /**< Sample count, or 0 for non-multisample */
+ GLboolean FixedSampleLocations; /**< Same sample locations for all pixels? */
};
@@ -1546,7 +1543,8 @@ struct gl_array_attrib
/**
* Vertex arrays as consumed by a driver.
- * The array pointer is set up only by the VBO module. */
+ * The array pointer is set up only by the VBO module.
+ */
const struct gl_client_array **_DrawArrays; /**< 0..VERT_ATTRIB_MAX-1 */
};
@@ -2102,7 +2100,10 @@ struct gl_sl_pragmas
*/
struct gl_shader
{
- GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */
+ /** GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB.
+ * Must be the first field.
+ */
+ GLenum Type;
GLuint Name; /**< AKA the handle */
GLint RefCount; /**< Reference count */
GLboolean DeletePending;
@@ -2186,6 +2187,7 @@ typedef enum
MESA_SHADER_TYPES = 3
} gl_shader_type;
+
struct gl_uniform_buffer_variable
{
char *Name;
@@ -2207,12 +2209,15 @@ struct gl_uniform_buffer_variable
GLboolean RowMajor;
};
-enum gl_uniform_block_packing {
+
+enum gl_uniform_block_packing
+{
ubo_packing_std140,
ubo_packing_shared,
ubo_packing_packed
};
+
struct gl_uniform_block
{
/** Declared name of the uniform block */
@@ -2244,6 +2249,7 @@ struct gl_uniform_block
enum gl_uniform_block_packing _Packing;
};
+
/**
* A GLSL program object.
* Basically a linked collection of vertex and fragment shaders.
@@ -2793,7 +2799,7 @@ struct gl_constants
GLuint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */
GLuint MaxTextureCoordUnits;
GLuint MaxCombinedTextureImageUnits;
- GLuint MaxTextureUnits; /**< = MIN(CoordUnits, FragmentProgram.ImageUnits) */
+ GLuint MaxTextureUnits; /**< = MIN(CoordUnits, FragmentProgram.ImageUnits) */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
GLuint MaxTextureBufferSize; /**< GL_ARB_texture_buffer_object */
@@ -3324,7 +3330,7 @@ struct gl_debug_namespace
struct gl_debug_state
{
GLDEBUGPROCARB Callback;
- GLvoid *CallbackData;
+ const void *CallbackData;
GLboolean SyncOutput;
GLboolean Defaults[MESA_DEBUG_SEVERITY_COUNT][MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
struct gl_debug_namespace Namespaces[MESA_DEBUG_SOURCE_COUNT][MESA_DEBUG_TYPE_COUNT];
diff --git a/mesalib/src/mesa/main/multisample.c b/mesalib/src/mesa/main/multisample.c
index 8b974c1b7..bd97c5096 100644
--- a/mesalib/src/mesa/main/multisample.c
+++ b/mesalib/src/mesa/main/multisample.c
@@ -80,7 +80,7 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
switch (pname) {
case GL_SAMPLE_POSITION: {
- if (index >= ctx->DrawBuffer->Visual.samples) {
+ if ((int) index >= ctx->DrawBuffer->Visual.samples) {
_mesa_error( ctx, GL_INVALID_VALUE, "glGetMultisamplefv(index)" );
return;
}
@@ -197,5 +197,6 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target,
* "... or if samples is greater than MAX_SAMPLES, then the error
* INVALID_VALUE is generated"
*/
- return samples > ctx->Const.MaxSamples ? GL_INVALID_VALUE : GL_NO_ERROR;
+ return (GLuint) samples > ctx->Const.MaxSamples
+ ? GL_INVALID_VALUE : GL_NO_ERROR;
}
diff --git a/mesalib/src/mesa/main/set.c b/mesalib/src/mesa/main/set.c
index 2519b9694..dc3550c76 100644
--- a/mesalib/src/mesa/main/set.c
+++ b/mesalib/src/mesa/main/set.c
@@ -103,8 +103,8 @@ entry_is_present(struct set_entry *entry)
struct set *
_mesa_set_create(void *mem_ctx,
- bool key_equals_function(const void *a,
- const void *b))
+ bool (*key_equals_function)(const void *a,
+ const void *b))
{
struct set *ht;
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index cf9a3014c..141cbe3ab 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -1547,7 +1547,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES:
if (!_mesa_is_gles(ctx) || !ctx->Extensions.OES_EGL_image_external)
goto invalid_pname;
- *params = obj->RequiredTextureImageUnits;
+ *params = (GLfloat) obj->RequiredTextureImageUnits;
break;
case GL_TEXTURE_SRGB_DECODE_EXT:
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index 9b66ad50b..04385e1e9 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -4143,7 +4143,7 @@ _mesa_store_compressed_texsubimage(struct gl_context *ctx, GLuint dims,
const GLubyte *src;
const gl_format texFormat = texImage->TexFormat;
GLuint bw, bh;
- GLuint slice;
+ GLint slice;
if (dims == 1) {
_mesa_problem(ctx, "Unexpected 1D compressed texsubimage call");
diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c
index 17e62403d..1e6f7f483 100644
--- a/mesalib/src/mesa/main/uniforms.c
+++ b/mesalib/src/mesa/main/uniforms.c
@@ -832,7 +832,7 @@ _mesa_get_uniform_name(const struct gl_uniform_storage *uni,
* harm in always appending "[0]" to uniform array names.
*/
if (uni->array_elements != 0) {
- unsigned i;
+ int i;
/* The comparison is strange because *length does *NOT* include the
* terminating NUL, but maxLength does.