summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/depthstencil.c4
-rw-r--r--src/mesa/main/descrip.mms32
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/ffvertex_prog.c18
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/queryobj.c5
-rw-r--r--src/mesa/main/shaders.c12
-rw-r--r--src/mesa/main/state.c6
-rw-r--r--src/mesa/main/texformat.c9
-rw-r--r--src/mesa/main/teximage.c18
-rw-r--r--src/mesa/main/texparam.c15
11 files changed, 72 insertions, 51 deletions
diff --git a/src/mesa/main/depthstencil.c b/src/mesa/main/depthstencil.c
index fb54d6184d9..9d208e2997d 100644
--- a/src/mesa/main/depthstencil.c
+++ b/src/mesa/main/depthstencil.c
@@ -282,8 +282,8 @@ _mesa_new_z24_renderbuffer_wrapper(GLcontext *ctx,
z24rb->RefCount = 1;
z24rb->Width = dsrb->Width;
z24rb->Height = dsrb->Height;
- z24rb->InternalFormat = GL_DEPTH_COMPONENT24_ARB;
- z24rb->_ActualFormat = GL_DEPTH_COMPONENT24_ARB;
+ z24rb->InternalFormat = GL_DEPTH_COMPONENT24;
+ z24rb->_ActualFormat = GL_DEPTH_COMPONENT24;
z24rb->_BaseFormat = GL_DEPTH_COMPONENT;
z24rb->DataType = GL_UNSIGNED_INT;
z24rb->DepthBits = 24;
diff --git a/src/mesa/main/descrip.mms b/src/mesa/main/descrip.mms
index 3ef215f47fa..e49ec65d42d 100644
--- a/src/mesa/main/descrip.mms
+++ b/src/mesa/main/descrip.mms
@@ -1,6 +1,6 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen [email protected]
-# Last revision : 2 October 2007
+# Last revision : 29 September 2008
.first
define gl [---.include.gl]
@@ -21,6 +21,7 @@ CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ie
SOURCES =accum.c \
api_arrayelt.c \
+ api_exec.c \
api_loopback.c \
api_noop.c \
api_validate.c \
@@ -29,6 +30,7 @@ SOURCES =accum.c \
blend.c \
bufferobj.c \
buffers.c \
+ clear.c \
clip.c \
colortab.c \
context.c \
@@ -46,6 +48,7 @@ SOURCES =accum.c \
extensions.c \
fbobject.c \
feedback.c \
+ ffvertex_prog.c \
fog.c \
framebuffer.c \
get.c \
@@ -60,22 +63,29 @@ SOURCES =accum.c \
matrix.c \
mipmap.c \
mm.c \
+ multisample.c \
pixel.c \
+ pixelstore.c \
points.c \
polygon.c \
rastpos.c \
rbadaptors.c \
+ readpix.c \
renderbuffer.c \
+ scissor.c \
shaders.c \
state.c \
stencil.c \
texcompress.c \
texcompress_fxt1.c \
texcompress_s3tc.c \
+ texenv.c \
texenvprogram.c \
texformat.c \
+ texgen.c \
teximage.c \
texobj.c \
+ texparam.c \
texrender.c \
texstate.c \
texstore.c \
@@ -86,6 +96,7 @@ SOURCES =accum.c \
OBJECTS=accum.obj,\
api_arrayelt.obj,\
+api_exec.obj,\
api_loopback.obj,\
api_noop.obj,\
api_validate.obj,\
@@ -94,6 +105,7 @@ attrib.obj,\
blend.obj,\
bufferobj.obj,\
buffers.obj,\
+clear.obj,\
clip.obj,\
colortab.obj,\
context.obj,\
@@ -111,6 +123,7 @@ execmem.obj,\
extensions.obj,\
fbobject.obj,\
feedback.obj,\
+ffvertex_prog.obj,\
fog.obj,\
framebuffer.obj,\
get.obj,\
@@ -125,21 +138,28 @@ lines.obj,\
matrix.obj,\
mipmap.obj,\
mm.obj,\
+multisample.obj,\
pixel.obj,\
+pixelstore.obj,\
points.obj,\
polygon.obj,\
rastpos.obj,\
+readpix.obj,\
renderbuffer.obj,\
+scissor.obj,\
shaders.obj,\
state.obj,\
stencil.obj,\
texcompress.obj,\
texcompress_fxt1.obj,\
texcompress_s3tc.obj,\
+texenv.obj,\
texenvprogram.obj,\
texformat.obj,\
+texgen.obj,\
teximage.obj,\
texobj.obj,\
+texparam.obj,\
texrender.obj,\
texstate.obj,\
texstore.obj,\
@@ -226,3 +246,13 @@ vtxfmt.obj : vtxfmt.c
shaders.obj : shaders.c
queryobj.obj : queryobj.c
rbadaptors.obj : rbadaptors.c
+clear.obj : clear.c
+multisample.obj : multisample.c
+scissor.obj : scissor.c
+texenv.obj : texenv.c
+texgen.obj : texgen.c
+texparam.obj : texparam.c
+readpix.obj : readpix.c
+ffvertex_prog.obj : ffvertex_prog.c
+api_exec.obj : api_exec.c
+pixelstore.obj : pixelstore.c
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 8dfbfeb62e4..95bf1165f45 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -165,7 +165,7 @@ static const struct {
{ OFF, "GL_SGIS_texture_border_clamp", F(ARB_texture_border_clamp) },
{ ON, "GL_SGIS_texture_edge_clamp", F(SGIS_texture_edge_clamp) },
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
- { OFF, "GL_SGIX_depth_texture", F(SGIX_depth_texture) },
+ { OFF, "GL_SGIX_depth_texture", F(ARB_depth_texture) },
{ OFF, "GL_SGIX_shadow", F(SGIX_shadow) },
{ OFF, "GL_SGIX_shadow_ambient", F(SGIX_shadow_ambient) },
{ OFF, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
@@ -292,7 +292,6 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.SGI_texture_color_table = GL_TRUE;
ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE;
- ctx->Extensions.SGIX_depth_texture = GL_TRUE;
ctx->Extensions.SGIX_shadow = GL_TRUE;
ctx->Extensions.SGIX_shadow_ambient = GL_TRUE;
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 787672be9f1..308b4ef7115 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -178,12 +178,12 @@ static GLboolean check_active_shininess( GLcontext *ctx,
-static struct state_key *make_state_key( GLcontext *ctx )
+static void make_state_key( GLcontext *ctx, struct state_key *key )
{
const struct gl_fragment_program *fp;
- struct state_key *key = CALLOC_STRUCT(state_key);
GLuint i;
+ memset(key, 0, sizeof(struct state_key));
fp = ctx->FragmentProgram._Current;
/* This now relies on texenvprogram.c being active:
@@ -301,8 +301,6 @@ static struct state_key *make_state_key( GLcontext *ctx )
texUnit->GenModeQ );
}
}
-
- return key;
}
@@ -1714,16 +1712,16 @@ struct gl_vertex_program *
_mesa_get_fixed_func_vertex_program(GLcontext *ctx)
{
struct gl_vertex_program *prog;
- struct state_key *key;
+ struct state_key key;
/* Grab all the relevent state and put it in a single structure:
*/
- key = make_state_key(ctx);
+ make_state_key(ctx, &key);
/* Look for an already-prepared program for this state:
*/
prog = (struct gl_vertex_program *)
- _mesa_search_program_cache(ctx->VertexProgram.Cache, key, sizeof(*key));
+ _mesa_search_program_cache(ctx->VertexProgram.Cache, &key, sizeof(key));
if (!prog) {
/* OK, we'll have to build a new one */
@@ -1735,7 +1733,7 @@ _mesa_get_fixed_func_vertex_program(GLcontext *ctx)
if (!prog)
return NULL;
- create_new_program( key, prog,
+ create_new_program( &key, prog,
ctx->Const.VertexProgram.MaxTemps );
#if 0
@@ -1744,10 +1742,8 @@ _mesa_get_fixed_func_vertex_program(GLcontext *ctx)
&prog->Base );
#endif
_mesa_program_cache_insert(ctx, ctx->VertexProgram.Cache,
- key, sizeof(*key), &prog->Base);
+ &key, sizeof(key), &prog->Base);
}
- _mesa_free(key);
-
return prog;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8bf6858c1e3..052da2c18e1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2628,7 +2628,6 @@ struct gl_extensions
GLboolean SGIS_generate_mipmap;
GLboolean SGIS_texture_edge_clamp;
GLboolean SGIS_texture_lod;
- GLboolean SGIX_depth_texture;
GLboolean SGIX_shadow;
GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */
GLboolean TDFX_texture_compression_FXT1;
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 2d060300300..554e0b0d181 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -90,9 +90,8 @@ _mesa_wait_query(GLcontext *ctx, struct gl_query_object *q)
/**
- * Delete an occlusion query object.
+ * Delete a query object. Called via ctx->Driver.DeleteQuery().
* Not removed from hash table here.
- * XXX maybe add Delete() method to gl_query_object class and call that instead
*/
void
_mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
@@ -546,6 +545,6 @@ delete_queryobj_cb(GLuint id, void *data, void *userData)
void
_mesa_free_query_data(GLcontext *ctx)
{
- _mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, NULL);
+ _mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, ctx);
_mesa_DeleteHashTable(ctx->Query.QueryObjects);
}
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index f0db0d2a818..aeb5d4ca2ab 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -233,10 +233,18 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
GET_CURRENT_CONTEXT(ctx);
/* Implement in terms of GetProgramiv, GetShaderiv */
if (ctx->Driver.IsProgram(ctx, object)) {
- ctx->Driver.GetProgramiv(ctx, object, pname, params);
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_PROGRAM_OBJECT_ARB;
+ } else {
+ ctx->Driver.GetProgramiv(ctx, object, pname, params);
+ }
}
else if (ctx->Driver.IsShader(ctx, object)) {
- ctx->Driver.GetShaderiv(ctx, object, pname, params);
+ if (pname == GL_OBJECT_TYPE_ARB) {
+ *params = GL_SHADER_OBJECT_ARB;
+ } else {
+ ctx->Driver.GetShaderiv(ctx, object, pname, params);
+ }
}
else {
_mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB");
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 7e44310d8d3..2f0e7cc368e 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -258,12 +258,6 @@ update_program(GLcontext *ctx)
}
}
- if (ctx->VertexProgram._Current)
- assert(ctx->VertexProgram._Current->Base.Parameters);
- if (ctx->FragmentProgram._Current)
- assert(ctx->FragmentProgram._Current->Base.Parameters);
-
-
/* XXX: get rid of _Active flag.
*/
#if 1
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 60f36c4a87f..ce2772c2992 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -1420,14 +1420,13 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
; /* fallthrough */
}
- if (ctx->Extensions.SGIX_depth_texture ||
- ctx->Extensions.ARB_depth_texture) {
+ if (ctx->Extensions.ARB_depth_texture) {
switch (internalFormat) {
case GL_DEPTH_COMPONENT:
- case GL_DEPTH_COMPONENT24_SGIX:
- case GL_DEPTH_COMPONENT32_SGIX:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
return &_mesa_texformat_z32;
- case GL_DEPTH_COMPONENT16_SGIX:
+ case GL_DEPTH_COMPONENT16:
return &_mesa_texformat_z16;
default:
; /* fallthrough */
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 91c41f38c30..bf23a1f290d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -241,13 +241,12 @@ _mesa_base_tex_format( GLcontext *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.SGIX_depth_texture ||
- ctx->Extensions.ARB_depth_texture) {
+ if (ctx->Extensions.ARB_depth_texture) {
switch (internalFormat) {
case GL_DEPTH_COMPONENT:
- case GL_DEPTH_COMPONENT16_SGIX:
- case GL_DEPTH_COMPONENT24_SGIX:
- case GL_DEPTH_COMPONENT32_SGIX:
+ case GL_DEPTH_COMPONENT16:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
return GL_DEPTH_COMPONENT;
default:
; /* fallthrough */
@@ -526,9 +525,9 @@ static GLboolean
is_depth_format(GLenum format)
{
switch (format) {
- case GL_DEPTH_COMPONENT16_ARB:
- case GL_DEPTH_COMPONENT24_ARB:
- case GL_DEPTH_COMPONENT32_ARB:
+ case GL_DEPTH_COMPONENT16:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
case GL_DEPTH_COMPONENT:
return GL_TRUE;
default:
@@ -2308,8 +2307,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
return;
}
- if (!ctx->Extensions.SGIX_depth_texture &&
- !ctx->Extensions.ARB_depth_texture && is_depth_format(format)) {
+ if (!ctx->Extensions.ARB_depth_texture && is_depth_format(format)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)");
return;
}
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 664adadfb9c..a9e752a6371 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -642,8 +642,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = 0;
break;
case GL_TEXTURE_DEPTH_SIZE_ARB:
- if (ctx->Extensions.SGIX_depth_texture ||
- ctx->Extensions.ARB_depth_texture)
+ if (ctx->Extensions.ARB_depth_texture)
*params = img->TexFormat->DepthBits;
else
_mesa_error(ctx, GL_INVALID_ENUM,
@@ -903,9 +902,9 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
#ifdef FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
params[0] = obj->CropRect[0];
- params[0] = obj->CropRect[1];
- params[0] = obj->CropRect[2];
- params[0] = obj->CropRect[3];
+ params[1] = obj->CropRect[1];
+ params[2] = obj->CropRect[2];
+ params[3] = obj->CropRect[3];
break;
#endif
default:
@@ -1053,9 +1052,9 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
#ifdef FEATURE_OES_draw_texture
case GL_TEXTURE_CROP_RECT_OES:
params[0] = obj->CropRect[0];
- params[0] = obj->CropRect[1];
- params[0] = obj->CropRect[2];
- params[0] = obj->CropRect[3];
+ params[1] = obj->CropRect[1];
+ params[2] = obj->CropRect[2];
+ params[3] = obj->CropRect[3];
break;
#endif
default: