diff options
author | marha <marha@users.sourceforge.net> | 2012-09-24 08:28:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-24 08:28:39 +0200 |
commit | 0ebcd32e91486caccc041c8ca23e39e160b24702 (patch) | |
tree | 50cd0bc17e8a587fdbecdf52be48fe8c59e222b9 /mesalib/src/mesa/main | |
parent | 06d4ea68085558b94d8e9c937091e7b7fcc5d95a (diff) | |
download | vcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.tar.gz vcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.tar.bz2 vcxsrv-0ebcd32e91486caccc041c8ca23e39e160b24702.zip |
mesa pixman xserver git update 24 sep 2012
xserver: 7722bcbab2507d263c7685b15cccbfdd52fc3a24
pixman: c4b69e706e63e01fbc70e0026c2079007c89de14
mesa: c432c86e6aeebeb46c028af940224c59faa16e88
Diffstat (limited to 'mesalib/src/mesa/main')
-rw-r--r-- | mesalib/src/mesa/main/fbobject.c | 3 | ||||
-rw-r--r-- | mesalib/src/mesa/main/ff_fragment_shader.cpp | 8 | ||||
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 2 | ||||
-rw-r--r-- | mesalib/src/mesa/main/texparam.c | 12 |
4 files changed, 19 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 1736899cb..9cde52ae6 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -2792,7 +2792,8 @@ compatible_resolve_formats(const struct gl_renderbuffer *colorReadRb, { /* The simple case where we know the backing formats are the same. */ - if (colorReadRb->Format == colorDrawRb->Format) { + if (_mesa_get_srgb_format_linear(colorReadRb->Format) == + _mesa_get_srgb_format_linear(colorDrawRb->Format)) { return GL_TRUE; } diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp index e850d47dd..f21cf80ae 100644 --- a/mesalib/src/mesa/main/ff_fragment_shader.cpp +++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp @@ -890,10 +890,10 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit) } else { float const_data[4] = { - 1 << rgb_shift, - 1 << rgb_shift, - 1 << rgb_shift, - 1 << alpha_shift + float(1 << rgb_shift), + float(1 << rgb_shift), + float(1 << rgb_shift), + float(1 << alpha_shift) }; shift = new(p->mem_ctx) ir_constant(glsl_type::vec4_type, (ir_constant_data *)const_data); diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 83e79a5a3..08af66893 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -2746,7 +2746,7 @@ _mesa_choose_texture_format(struct gl_context *ctx, /* If the application requested compression to an S3TC format but we don't * have the DTXn library, force a generic compressed format instead. */ - if (internalFormat != format) { + if (internalFormat != format && format != GL_NONE) { const GLenum before = internalFormat; switch (internalFormat) { diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c index 63a63b732..f73e2b5f0 100644 --- a/mesalib/src/mesa/main/texparam.c +++ b/mesalib/src/mesa/main/texparam.c @@ -1440,6 +1440,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = (GLfloat) obj->Immutable; break; + case GL_TEXTURE_SRGB_DECODE_EXT: + if (!ctx->Extensions.EXT_texture_sRGB_decode) + goto invalid_pname; + *params = (GLfloat) obj->Sampler.sRGBDecode; + break; + default: goto invalid_pname; } @@ -1612,6 +1618,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = obj->RequiredTextureImageUnits; break; + case GL_TEXTURE_SRGB_DECODE_EXT: + if (!ctx->Extensions.EXT_texture_sRGB_decode) + goto invalid_pname; + *params = obj->Sampler.sRGBDecode; + break; + default: goto invalid_pname; } |