aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r--mesalib/src/mesa/main/context.c2
-rw-r--r--mesalib/src/mesa/main/errors.c15
-rw-r--r--mesalib/src/mesa/main/get.c2
-rw-r--r--mesalib/src/mesa/main/mtypes.h8
-rw-r--r--mesalib/src/mesa/main/queryobj.c1
-rw-r--r--mesalib/src/mesa/main/shaderapi.c1
-rw-r--r--mesalib/src/mesa/main/texcompress.c22
7 files changed, 23 insertions, 28 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index d687fb7c0..d726d117b 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -622,7 +622,7 @@ _mesa_init_constants(struct gl_context *ctx)
ctx->Const.MaxSamples = 0;
/* GL_ARB_sync */
- ctx->Const.MaxServerWaitTimeout = (GLuint64) ~0;
+ ctx->Const.MaxServerWaitTimeout = 0x1fff7fffffffULL;
/* GL_ATI_envmap_bumpmap */
ctx->Const.SupportedBumpUnits = SUPPORTED_ATI_BUMP_UNITS;
diff --git a/mesalib/src/mesa/main/errors.c b/mesalib/src/mesa/main/errors.c
index 5a0758d0b..cc93d3bd6 100644
--- a/mesalib/src/mesa/main/errors.c
+++ b/mesalib/src/mesa/main/errors.c
@@ -609,11 +609,6 @@ control_app_messages(struct gl_context *ctx, GLenum esource, GLenum etype,
enum mesa_debug_type type = gl_enum_to_debug_type(etype);
enum mesa_debug_severity severity = gl_enum_to_debug_severity(eseverity);
- if (count)
- assert(severity == MESA_DEBUG_SEVERITY_COUNT
- && type != MESA_DEBUG_TYPE_COUNT
- && source != MESA_DEBUG_SOURCE_COUNT);
-
for (i = 0; i < count; i++)
set_message_state(ctx, source, type, ids[i], enabled);
@@ -629,9 +624,6 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type,
GLsizei count, const GLuint *ids,
GLboolean enabled)
{
- enum mesa_debug_source source;
- enum mesa_debug_type type;
- enum mesa_debug_severity severity;
GET_CURRENT_CONTEXT(ctx);
if (count < 0) {
@@ -651,11 +643,8 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type,
return;
}
- source = gl_enum_to_debug_source(gl_source);
- type = gl_enum_to_debug_type(gl_type);
- severity = gl_enum_to_debug_severity(gl_severity);
-
- control_app_messages(ctx, source, type, severity, count, ids, enabled);
+ control_app_messages(ctx, gl_source, gl_type, gl_severity,
+ count, ids, enabled);
}
void GLAPIENTRY
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 09b008a07..4f6f59ae6 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -709,7 +709,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
v->value_int_n.n =
_mesa_get_compressed_formats(ctx, v->value_int_n.ints);
- ASSERT(v->value_int_n.n <= 100);
+ ASSERT(v->value_int_n.n <= ARRAY_SIZE(v->value_int_n.ints));
break;
case GL_MAX_VARYING_FLOATS_ARB:
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 5f9b7f983..22bb58c5f 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -1924,6 +1924,7 @@ struct gl_geometry_program
GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+ GLboolean UsesClipDistance;
};
@@ -2348,6 +2349,13 @@ struct gl_shader_program
GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+ /**
+ * True if gl_ClipDistance is written to. Copied into
+ * gl_geometry_program by _mesa_copy_linked_program_data().
+ */
+ GLboolean UsesClipDistance;
+ GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or
+ 0 if not present. */
} Geom;
/** Vertex shader state */
diff --git a/mesalib/src/mesa/main/queryobj.c b/mesalib/src/mesa/main/queryobj.c
index ca3a8549e..ccd5b0179 100644
--- a/mesalib/src/mesa/main/queryobj.c
+++ b/mesalib/src/mesa/main/queryobj.c
@@ -485,6 +485,7 @@ _mesa_QueryCounter(GLuint id, GLenum target)
q->Target = target;
q->Result = 0;
q->Ready = GL_FALSE;
+ q->EverBound = GL_TRUE;
if (ctx->Driver.QueryCounter) {
ctx->Driver.QueryCounter(ctx, q);
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index d184b114c..4fe9d9ca2 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -1871,6 +1871,7 @@ _mesa_copy_linked_program_data(gl_shader_type type,
dst_gp->VerticesOut = src->Geom.VerticesOut;
dst_gp->InputType = src->Geom.InputType;
dst_gp->OutputType = src->Geom.OutputType;
+ dst_gp->UsesClipDistance = src->Geom.UsesClipDistance;
}
break;
default:
diff --git a/mesalib/src/mesa/main/texcompress.c b/mesalib/src/mesa/main/texcompress.c
index 58859440c..e71d0c411 100644
--- a/mesalib/src/mesa/main/texcompress.c
+++ b/mesalib/src/mesa/main/texcompress.c
@@ -264,20 +264,16 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
n += 3;
}
}
- if (_mesa_is_desktop_gl(ctx)
- && ctx->Extensions.ANGLE_texture_compression_dxt) {
- if (formats) {
- formats[n++] = GL_RGB_S3TC;
- formats[n++] = GL_RGB4_S3TC;
- formats[n++] = GL_RGBA_S3TC;
- formats[n++] = GL_RGBA4_S3TC;
- }
- else {
- n += 4;
- }
- }
- if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
+ /* The GL_OES_compressed_ETC1_RGB8_texture spec says:
+ *
+ * "New State
+ *
+ * The queries for NUM_COMPRESSED_TEXTURE_FORMATS and
+ * COMPRESSED_TEXTURE_FORMATS include ETC1_RGB8_OES."
+ */
+ if (_mesa_is_gles(ctx)
+ && ctx->Extensions.OES_compressed_ETC1_RGB8_texture) {
if (formats) {
formats[n++] = GL_ETC1_RGB8_OES;
}