aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/common
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-11-22 19:42:40 +0000
committermarha <marha@users.sourceforge.net>2010-11-22 19:42:40 +0000
commit85ef9930f56bf15181f9a0b238f03d55303cf411 (patch)
tree63b43286956ebd1c35c96e9b3d5305aabdf71a0f /mesalib/src/mesa/drivers/common
parent94810d19989336862251dbf69c3f3acb18a9b06d (diff)
downloadvcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.gz
vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.bz2
vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.zip
Updated to mesalib 7.9
Diffstat (limited to 'mesalib/src/mesa/drivers/common')
-rw-r--r--mesalib/src/mesa/drivers/common/driverfuncs.c33
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c33
2 files changed, 26 insertions, 40 deletions
diff --git a/mesalib/src/mesa/drivers/common/driverfuncs.c b/mesalib/src/mesa/drivers/common/driverfuncs.c
index ebfaa2f07..f92cdc5a7 100644
--- a/mesalib/src/mesa/drivers/common/driverfuncs.c
+++ b/mesalib/src/mesa/drivers/common/driverfuncs.c
@@ -31,25 +31,20 @@
#include "main/mipmap.h"
#include "main/queryobj.h"
#include "main/renderbuffer.h"
+#include "main/shaderobj.h"
#include "main/texcompress.h"
#include "main/texformat.h"
#include "main/texgetimage.h"
#include "main/teximage.h"
#include "main/texobj.h"
#include "main/texstore.h"
-#if FEATURE_ARB_vertex_buffer_object
#include "main/bufferobj.h"
-#endif
-#if FEATURE_EXT_framebuffer_object
#include "main/fbobject.h"
#include "main/texrender.h"
-#endif
-#if FEATURE_ARB_sync
#include "main/syncobj.h"
-#endif
+#include "main/transformfeedback.h"
-#include "shader/program.h"
-#include "shader/shader_api.h"
+#include "program/program.h"
#include "tnl/tnl.h"
#include "swrast/swrast.h"
@@ -178,41 +173,31 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->TexParameter = NULL;
driver->Viewport = NULL;
- /* state queries */
- driver->GetBooleanv = NULL;
- driver->GetDoublev = NULL;
- driver->GetFloatv = NULL;
- driver->GetIntegerv = NULL;
- driver->GetInteger64v = NULL;
- driver->GetPointerv = NULL;
-
/* buffer objects */
_mesa_init_buffer_object_functions(driver);
/* query objects */
_mesa_init_query_object_functions(driver);
-#if FEATURE_ARB_sync
_mesa_init_sync_object_functions(driver);
-#endif
-#if FEATURE_EXT_framebuffer_object
driver->NewFramebuffer = _mesa_new_framebuffer;
driver->NewRenderbuffer = _mesa_new_soft_renderbuffer;
driver->RenderTexture = _mesa_render_texture;
driver->FinishRenderTexture = _mesa_finish_render_texture;
driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer;
-#endif
-#if FEATURE_EXT_framebuffer_blit
driver->BlitFramebuffer = _swrast_BlitFramebuffer;
-#endif
/* APPLE_vertex_array_object */
driver->NewArrayObject = _mesa_new_array_object;
driver->DeleteArrayObject = _mesa_delete_array_object;
driver->BindArrayObject = NULL;
+ _mesa_init_shader_object_functions(driver);
+
+ _mesa_init_transform_feedback_functions(driver);
+
/* T&L stuff */
driver->NeedValidate = GL_FALSE;
driver->ValidateTnlModule = NULL;
@@ -232,10 +217,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->EndList = NULL;
driver->BeginCallList = NULL;
driver->EndCallList = NULL;
-
-
- /* XXX temporary here */
- _mesa_init_glsl_driver_functions(driver);
}
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 89ca476f9..a03cb68ec 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -34,6 +34,7 @@
#include "main/glheader.h"
#include "main/mtypes.h"
#include "main/imports.h"
+#include "main/arbprogram.h"
#include "main/arrayobj.h"
#include "main/blend.h"
#include "main/bufferobj.h"
@@ -51,7 +52,7 @@
#include "main/polygon.h"
#include "main/readpix.h"
#include "main/scissor.h"
-#include "main/shaders.h"
+#include "main/shaderapi.h"
#include "main/state.h"
#include "main/stencil.h"
#include "main/texobj.h"
@@ -61,8 +62,7 @@
#include "main/texstate.h"
#include "main/varray.h"
#include "main/viewport.h"
-#include "shader/program.h"
-#include "shader/arbprogram.h"
+#include "program/program.h"
#include "swrast/swrast.h"
#include "drivers/common/meta.h"
@@ -430,13 +430,15 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state)
if (state & META_SHADER) {
if (ctx->Extensions.ARB_vertex_program) {
save->VertexProgramEnabled = ctx->VertexProgram.Enabled;
- save->VertexProgram = ctx->VertexProgram.Current;
+ _mesa_reference_vertprog(ctx, &save->VertexProgram,
+ ctx->VertexProgram.Current);
_mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE);
}
if (ctx->Extensions.ARB_fragment_program) {
save->FragmentProgramEnabled = ctx->FragmentProgram.Enabled;
- save->FragmentProgram = ctx->FragmentProgram.Current;
+ _mesa_reference_fragprog(ctx, &save->FragmentProgram,
+ ctx->FragmentProgram.Current);
_mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_FALSE);
}
@@ -664,6 +666,7 @@ _mesa_meta_end(GLcontext *ctx)
save->VertexProgramEnabled);
_mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
save->VertexProgram);
+ _mesa_reference_vertprog(ctx, &save->VertexProgram, NULL);
}
if (ctx->Extensions.ARB_fragment_program) {
@@ -671,6 +674,7 @@ _mesa_meta_end(GLcontext *ctx)
save->FragmentProgramEnabled);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
save->FragmentProgram);
+ _mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
}
if (ctx->Extensions.ARB_shader_objects) {
@@ -721,6 +725,7 @@ _mesa_meta_end(GLcontext *ctx)
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
_mesa_reference_texobj(&ctx->Texture.Unit[0].CurrentTex[tgt],
save->CurrentTexture[tgt]);
+ _mesa_reference_texobj(&save->CurrentTexture[tgt], NULL);
}
/* Re-enable textures, texgen */
@@ -2082,8 +2087,10 @@ _mesa_meta_Bitmap(GLcontext *ctx,
}
bitmap1 = _mesa_map_pbo_source(ctx, &unpackSave, bitmap1);
- if (!bitmap1)
+ if (!bitmap1) {
+ _mesa_meta_end(ctx);
return;
+ }
bitmap8 = (GLubyte *) calloc(1, width * height);
if (bitmap8) {
@@ -2393,6 +2400,9 @@ _mesa_meta_GenerateMipmap(GLcontext *ctx, GLenum target,
break;
}
+ /* Set MaxLevel large enough to hold the new level when we allocate it */
+ _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, dstLevel);
+
/* Create empty dest image */
if (target == GL_TEXTURE_1D) {
_mesa_TexImage1D(target, dstLevel, srcImage->InternalFormat,
@@ -2560,12 +2570,6 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
return;
}
- if (texImage->TexFormat == MESA_FORMAT_NONE)
- texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx,
- internalFormat,
- format,
- type);
-
_mesa_unlock_texture(ctx, texObj); /* need to unlock first */
/*
@@ -2579,12 +2583,10 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
/*
* Prepare for new texture image size/data
*/
-#if FEATURE_convolve
if (_mesa_is_color_format(internalFormat)) {
_mesa_adjust_image_for_convolution(ctx, 2,
&postConvWidth, &postConvHeight);
}
-#endif
if (texImage->Data) {
ctx->Driver.FreeTexImageData(ctx, texImage);
@@ -2594,6 +2596,9 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
postConvWidth, postConvHeight, 1,
border, internalFormat);
+ _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
+ internalFormat, GL_NONE, GL_NONE);
+
/*
* Store texture data (with pixel transfer ops)
*/