diff options
author | marha <marha@users.sourceforge.net> | 2011-12-08 09:32:47 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-12-08 09:32:47 +0100 |
commit | acd000667561cb9978ead7f14d4fbb97c1a8e727 (patch) | |
tree | 21668e5efeb08af34de6c679d4c46cc6fe5d7b64 /mesalib | |
parent | 893624a6c15d4ee6cf1d46e4ad29282c72bee962 (diff) | |
parent | 5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987 (diff) | |
download | vcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.tar.gz vcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.tar.bz2 vcxsrv-acd000667561cb9978ead7f14d4fbb97c1a8e727.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib')
-rw-r--r-- | mesalib/src/mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 7 | ||||
-rw-r--r-- | mesalib/src/mesa/main/transformfeedback.c | 9 | ||||
-rw-r--r-- | mesalib/src/mesa/swrast/s_texfilter.c | 18 |
4 files changed, 28 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index 33b00c680..fc494f748 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -3051,6 +3051,7 @@ struct gl_matrix_stack #define _NEW_PROGRAM_CONSTANTS (1 << 27) #define _NEW_BUFFER_OBJECT (1 << 28) #define _NEW_FRAG_CLAMP (1 << 29) +#define _NEW_TRANSFORM_FEEDBACK (1 << 30) /**< gl_context::TransformFeedback */ #define _NEW_ALL ~0 /*@}*/ diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 99905de3a..8a002b675 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -1636,7 +1636,8 @@ texture_error_check( struct gl_context *ctx, /* additional checks for depth textures */ if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) { - /* Only 1D, 2D, rect and array textures supported, not 3D or cubes */ + /* Only 1D, 2D, rect, array and cube textures supported, not 3D + * Cubemaps are only supported for GL version > 3.0 or with EXT_gpu_shader4 */ if (target != GL_TEXTURE_1D && target != GL_PROXY_TEXTURE_1D && target != GL_TEXTURE_2D && @@ -1646,7 +1647,9 @@ texture_error_check( struct gl_context *ctx, target != GL_TEXTURE_2D_ARRAY && target != GL_PROXY_TEXTURE_2D_ARRAY && target != GL_TEXTURE_RECTANGLE_ARB && - target != GL_PROXY_TEXTURE_RECTANGLE_ARB) { + target != GL_PROXY_TEXTURE_RECTANGLE_ARB && + !((_mesa_is_cube_face(target) || target == GL_PROXY_TEXTURE_CUBE_MAP) && + (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4))) { if (!isProxy) _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target/internalFormat)"); diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c index 11abd037d..799245d4e 100644 --- a/mesalib/src/mesa/main/transformfeedback.c +++ b/mesalib/src/mesa/main/transformfeedback.c @@ -376,6 +376,7 @@ _mesa_BeginTransformFeedback(GLenum mode) return; } + FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK); obj->Active = GL_TRUE; ctx->TransformFeedback.Mode = mode; @@ -398,6 +399,7 @@ _mesa_EndTransformFeedback(void) return; } + FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK); ctx->TransformFeedback.CurrentObject->Active = GL_FALSE; assert(ctx->Driver.EndTransformFeedback); @@ -415,6 +417,7 @@ bind_buffer_range(struct gl_context *ctx, GLuint index, { struct gl_transform_feedback_object *obj = ctx->TransformFeedback.CurrentObject; + FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK); /* The general binding point */ _mesa_reference_buffer_object(ctx, @@ -650,7 +653,9 @@ _mesa_TransformFeedbackVaryings(GLuint program, GLsizei count, shProg->TransformFeedback.BufferMode = bufferMode; - /* The varyings won't be used until shader link time */ + /* No need to set _NEW_TRANSFORM_FEEDBACK (or invoke FLUSH_VERTICES) since + * the varyings won't be used until shader link time. + */ } @@ -874,6 +879,7 @@ _mesa_PauseTransformFeedback(void) return; } + FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK); obj->Paused = GL_TRUE; assert(ctx->Driver.PauseTransformFeedback); @@ -899,6 +905,7 @@ _mesa_ResumeTransformFeedback(void) return; } + FLUSH_VERTICES(ctx, _NEW_TRANSFORM_FEEDBACK); obj->Paused = GL_FALSE; assert(ctx->Driver.ResumeTransformFeedback); diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index fb172f3a8..21b55a801 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -3437,7 +3437,8 @@ sample_depth_texture( struct gl_context *ctx, tObj->Target == GL_TEXTURE_2D || tObj->Target == GL_TEXTURE_RECTANGLE_NV || tObj->Target == GL_TEXTURE_1D_ARRAY_EXT || - tObj->Target == GL_TEXTURE_2D_ARRAY_EXT); + tObj->Target == GL_TEXTURE_2D_ARRAY_EXT || + tObj->Target == GL_TEXTURE_CUBE_MAP); ambient = tObj->Sampler.CompareFailValue; @@ -3684,7 +3685,10 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_3d; } case GL_TEXTURE_CUBE_MAP: - if (needLambda) { + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { return &sample_lambda_cube; } else if (t->Sampler.MinFilter == GL_LINEAR) { @@ -3709,7 +3713,10 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_rect; } case GL_TEXTURE_1D_ARRAY_EXT: - if (needLambda) { + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { return &sample_lambda_1d_array; } else if (t->Sampler.MinFilter == GL_LINEAR) { @@ -3720,7 +3727,10 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx, return &sample_nearest_1d_array; } case GL_TEXTURE_2D_ARRAY_EXT: - if (needLambda) { + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { return &sample_lambda_2d_array; } else if (t->Sampler.MinFilter == GL_LINEAR) { |