aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shared.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
committermarha <marha@users.sourceforge.net>2010-11-29 22:05:53 +0000
commitfed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7 (patch)
treefa1ba494685a71e28a096990a8707680c7cb378b /mesalib/src/mesa/main/shared.c
parentae340911c1ba1f98b418bd8f1a487fa4d79491b0 (diff)
parent6fda93be42ace9eeab0e82ceebb6798961c9105c (diff)
downloadvcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.gz
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.tar.bz2
vcxsrv-fed109d6a33c0871291d1bb2f3f6b7a3d1a3e9d7.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/shared.c')
-rw-r--r--mesalib/src/mesa/main/shared.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c
index e364e2404..a56c70fa7 100644
--- a/mesalib/src/mesa/main/shared.c
+++ b/mesalib/src/mesa/main/shared.c
@@ -32,18 +32,15 @@
#include "imports.h"
#include "mtypes.h"
#include "hash.h"
-#include "arrayobj.h"
+#if FEATURE_ATI_fragment_shader
+#include "atifragshader.h"
+#endif
#include "bufferobj.h"
#include "shared.h"
-#include "shader/program.h"
-#include "shader/shader_api.h"
+#include "program/program.h"
#include "dlist.h"
-#if FEATURE_ATI_fragment_shader
-#include "shader/atifragshader.h"
-#endif
-#if FEATURE_ARB_sync
+#include "shaderobj.h"
#include "syncobj.h"
-#endif
/**
* Allocate and initialize a shared context state structure.
@@ -123,9 +120,7 @@ _mesa_alloc_shared_state(GLcontext *ctx)
shared->RenderBuffers = _mesa_NewHashTable();
#endif
-#if FEATURE_ARB_sync
make_empty_list(& shared->SyncObjects);
-#endif
return shared;
}
@@ -228,12 +223,12 @@ delete_shader_cb(GLuint id, void *data, void *userData)
GLcontext *ctx = (GLcontext *) userData;
struct gl_shader *sh = (struct gl_shader *) data;
if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) {
- _mesa_free_shader(ctx, sh);
+ ctx->Driver.DeleteShader(ctx, sh);
}
else {
struct gl_shader_program *shProg = (struct gl_shader_program *) data;
ASSERT(shProg->Type == GL_SHADER_PROGRAM_MESA);
- _mesa_free_shader_program(ctx, shProg);
+ ctx->Driver.DeleteShaderProgram(ctx, shProg);
}
}
@@ -289,6 +284,10 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
{
GLuint i;
+ /* Free the dummy/fallback texture object */
+ if (shared->FallbackTex)
+ ctx->Driver.DeleteTexture(ctx, shared->FallbackTex);
+
/*
* Free display lists
*/
@@ -334,7 +333,6 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
_mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL);
#endif
-#if FEATURE_ARB_sync
{
struct simple_node *node;
struct simple_node *temp;
@@ -343,7 +341,6 @@ free_shared_state(GLcontext *ctx, struct gl_shared_state *shared)
_mesa_unref_sync_object(ctx, (struct gl_sync_object *) node);
}
}
-#endif
/*
* Free texture objects (after FBOs since some textures might have