diff options
Diffstat (limited to 'mesalib')
-rw-r--r-- | mesalib/docs/GL3.txt | 2 | ||||
-rw-r--r-- | mesalib/src/glu/sgi/include/gluos.h | 4 | ||||
-rw-r--r-- | mesalib/src/glu/sgi/libutil/mipmap.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/macros.h | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/program/program_parse.y | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_format.c | 23 |
8 files changed, 42 insertions, 9 deletions
diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt index bd27e5cd5..3bc20797a 100644 --- a/mesalib/docs/GL3.txt +++ b/mesalib/docs/GL3.txt @@ -105,7 +105,7 @@ GL_ARB_transform_feedback3 not started GL 4.1:
GLSL 4.1 not started
-GL_ARB_ES2_compatibility mostly done (Intel?)
+GL_ARB_ES2_compatibility DONE (i965)
GL_ARB_get_program_binary not started
GL_ARB_separate_shader_objects some infrastructure done
GL_ARB_shader_precision not started
diff --git a/mesalib/src/glu/sgi/include/gluos.h b/mesalib/src/glu/sgi/include/gluos.h index e22e6721e..6e1691022 100644 --- a/mesalib/src/glu/sgi/include/gluos.h +++ b/mesalib/src/glu/sgi/include/gluos.h @@ -60,6 +60,10 @@ #pragma comment(linker, "/OPT:NOWIN98")
#endif
+#ifndef WINGDIAPI
+#define WINGDIAPI
+#endif
+
#elif defined(__OS2__)
#include <stdlib.h>
diff --git a/mesalib/src/glu/sgi/libutil/mipmap.c b/mesalib/src/glu/sgi/libutil/mipmap.c index a156a963d..3ba3667ae 100644 --- a/mesalib/src/glu/sgi/libutil/mipmap.c +++ b/mesalib/src/glu/sgi/libutil/mipmap.c @@ -6631,7 +6631,7 @@ static TexImage3Dproc pTexImage3D = 0; # include <dlfcn.h>
# include <sys/types.h>
#else
-# include <windows.h>
+ WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
#endif
static void gluTexImage3D( GLenum target, GLint level,
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h index a54663ced..1d5d7f346 100644 --- a/mesalib/src/mesa/main/macros.h +++ b/mesalib/src/mesa/main/macros.h @@ -669,6 +669,10 @@ do { \ /** Maximum of two values: */
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
+/** Minimum and maximum of three values: */
+#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C))
+#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
+
/** Dot product of two 2-element vectors */
#define DOT2( a, b ) ( (a)[0]*(b)[0] + (a)[1]*(b)[1] )
diff --git a/mesalib/src/mesa/program/program_parse.y b/mesalib/src/mesa/program/program_parse.y index d87470b49..e7752fcbd 100644 --- a/mesalib/src/mesa/program/program_parse.y +++ b/mesalib/src/mesa/program/program_parse.y @@ -1258,7 +1258,11 @@ optArraySize: | INTEGER
{
if (($1 < 1) || ((unsigned) $1 > state->limits->MaxParameters)) {
- yyerror(& @1, state, "invalid parameter array size");
+ char msg[100];
+ _mesa_snprintf(msg, sizeof(msg),
+ "invalid parameter array size (size=%d max=%u)",
+ $1, state->limits->MaxParameters);
+ yyerror(& @1, state, msg);
YYERROR;
} else {
$$ = $1;
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 61e127776..bf4fef57a 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -247,7 +247,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp, const struct gl_buffer_object *firstBufObj = NULL;
GLint firstStride = -1;
const GLubyte *client_addr = NULL;
- GLboolean user_memory;
+ GLboolean user_memory = GL_FALSE;
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 1cbe618ce..8f697fa51 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -167,6 +167,8 @@ void st_init_limits(struct st_context *st) pc->MaxNativeAddressRegs = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_ADDRS);
pc->MaxNativeParameters = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_CONSTS);
pc->MaxUniformComponents = 4 * MIN2(pc->MaxNativeParameters, MAX_UNIFORMS);
+ /* raise MaxParameters if native support is higher */
+ pc->MaxParameters = MAX2(pc->MaxParameters, pc->MaxNativeParameters);
options->EmitNoNoise = TRUE;
@@ -187,7 +189,7 @@ void st_init_limits(struct st_context *st) options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
- if(options->EmitNoLoops)
+ if (options->EmitNoLoops)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
}
@@ -539,8 +541,8 @@ void st_init_extensions(struct st_context *st) PIPE_TEXTURE_2D, 0,
PIPE_BIND_RENDER_TARGET) &&
!screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SNORM,
- PIPE_TEXTURE_2D, 0,
- PIPE_BIND_RENDER_TARGET) &&
+ PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_RENDER_TARGET) &&
!screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_FLOAT,
PIPE_TEXTURE_2D, 0,
PIPE_BIND_RENDER_TARGET) &&
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c index 8b3e782a5..32b44b806 100644 --- a/mesalib/src/mesa/state_tracker/st_format.c +++ b/mesalib/src/mesa/state_tracker/st_format.c @@ -954,14 +954,24 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, /* prefer formats in order of data size, choosing 16-bit ones if equal sized */
case GL_RGBA16F_ARB:
+ {
+ static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R16G16B16A16_FLOAT,
+ PIPE_FORMAT_R32G32B32A32_FLOAT
+ };
+ return find_supported_format(screen, formats, Elements(formats),
+ target, sample_count, bindings);
+ }
case GL_RGB16F_ARB:
{
static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R16G16B16_FLOAT,
PIPE_FORMAT_R16G16B16A16_FLOAT,
+ PIPE_FORMAT_R32G32B32_FLOAT,
PIPE_FORMAT_R32G32B32A32_FLOAT
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings);
+ target, sample_count, bindings);
}
case GL_LUMINANCE_ALPHA16F_ARB:
{
@@ -1040,14 +1050,23 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, /* try a 32-bit format if available, otherwise fallback to a 16-bit one */
case GL_RGBA32F_ARB:
+ {
+ static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R32G32B32A32_FLOAT,
+ PIPE_FORMAT_R16G16B16A16_FLOAT
+ };
+ return find_supported_format(screen, formats, Elements(formats),
+ target, sample_count, bindings);
+ }
case GL_RGB32F_ARB:
{
static const enum pipe_format formats[] = {
+ PIPE_FORMAT_R32G32B32_FLOAT,
PIPE_FORMAT_R32G32B32A32_FLOAT,
PIPE_FORMAT_R16G16B16A16_FLOAT
};
return find_supported_format(screen, formats, Elements(formats),
- target, sample_count, bindings);
+ target, sample_count, bindings);
}
case GL_LUMINANCE_ALPHA32F_ARB:
{
|