From d4d629b77742e60caac3d120ff40e9f386380af2 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 4 Mar 2013 08:18:40 +0100 Subject: fontconfig libX11 mesalib pixman xserver xkeyboard-config git update 4 Mar 2013 xserver commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 xkeyboard-config commit fa2f330df22511c3846cb1cb0760551c6e244a81 libX11 commit c23d61d1b84dca3740bf4786978c7908d0065fb9 pixman commit 5feda20fc39407879993ed4a6d861ef7f78d9432 fontconfig commit 612ee2a5c91b8929b2cc5abce4af84d8d7e66bd0 mesa commit e29124717eae4f8d329bb6a9707b802c0ff4bdd9 --- mesalib/src/mesa/main/fbobject.c | 62 +++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 16 deletions(-) (limited to 'mesalib/src/mesa/main/fbobject.c') diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 89bc57509..d6acc5896 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -745,6 +745,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, GLenum intFormat = GL_NONE; /* color buffers' internal format */ GLuint minWidth = ~0, minHeight = ~0, maxWidth = 0, maxHeight = 0; GLint numSamples = -1; + GLint fixedSampleLocations = -1; GLint i; GLuint j; @@ -814,12 +815,29 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, f = texImg->_BaseFormat; attFormat = texImg->TexFormat; numImages++; + if (!is_format_color_renderable(ctx, attFormat, texImg->InternalFormat) && !is_legal_depth_format(ctx, f)) { fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT; fbo_incomplete("texture attachment incomplete", -1); return; } + + if (numSamples < 0) + numSamples = texImg->NumSamples; + else if (numSamples != texImg->NumSamples) { + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; + fbo_incomplete("inconsistent sample count", -1); + return; + } + + if (fixedSampleLocations < 0) + fixedSampleLocations = texImg->FixedSampleLocations; + else if (fixedSampleLocations != texImg->FixedSampleLocations) { + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; + fbo_incomplete("inconsistent fixed sample locations", -1); + return; + } } else if (att->Type == GL_RENDERBUFFER_EXT) { minWidth = MIN2(minWidth, att->Renderbuffer->Width); @@ -829,24 +847,35 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, f = att->Renderbuffer->InternalFormat; attFormat = att->Renderbuffer->Format; numImages++; + + if (numSamples < 0) + numSamples = att->Renderbuffer->NumSamples; + else if (numSamples != att->Renderbuffer->NumSamples) { + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; + fbo_incomplete("inconsistent sample count", -1); + return; + } + + /* RENDERBUFFER has fixedSampleLocations implicitly true */ + if (fixedSampleLocations < 0) + fixedSampleLocations = GL_TRUE; + else if (fixedSampleLocations != GL_TRUE) { + fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; + fbo_incomplete("inconsistent fixed sample locations", -1); + return; + } } else { assert(att->Type == GL_NONE); continue; } - if (att->Renderbuffer && numSamples < 0) { - /* first buffer */ - numSamples = att->Renderbuffer->NumSamples; - } - /* check if integer color */ fb->_IntegerColor = _mesa_is_format_integer_color(attFormat); - /* Error-check width, height, format, samples - */ + /* Error-check width, height, format */ if (numImages == 1) { - /* save format, num samples */ + /* save format */ if (i >= 0) { intFormat = f; } @@ -866,12 +895,6 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, return; } } - if (att->Renderbuffer && - att->Renderbuffer->NumSamples != numSamples) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; - fbo_incomplete("inconsistant number of samples", i); - return; - } } /* Check that the format is valid. (MESA_FORMAT_NONE means unsupported) @@ -2069,7 +2092,8 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, err = (texObj->Target != GL_TEXTURE_3D) && (texObj->Target != GL_TEXTURE_1D_ARRAY_EXT) && (texObj->Target != GL_TEXTURE_2D_ARRAY_EXT) && - (texObj->Target != GL_TEXTURE_CUBE_MAP_ARRAY); + (texObj->Target != GL_TEXTURE_CUBE_MAP_ARRAY) && + (texObj->Target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY); } else { /* Make sure textarget is consistent with the texture's type */ @@ -2103,7 +2127,8 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, } else if ((texObj->Target == GL_TEXTURE_1D_ARRAY_EXT) || (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT) || - (texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY)) { + (texObj->Target == GL_TEXTURE_CUBE_MAP_ARRAY) || + (texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)) { if (zoffset < 0 || zoffset >= (GLint) ctx->Const.MaxArrayTextureLayers) { _mesa_error(ctx, GL_INVALID_VALUE, @@ -2255,6 +2280,11 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment, error = (_mesa_is_gles(ctx) && ctx->Version < 30) || !ctx->Extensions.EXT_texture_array; break; + case GL_TEXTURE_2D_MULTISAMPLE: + case GL_TEXTURE_2D_MULTISAMPLE_ARRAY: + error = _mesa_is_gles(ctx) + || !ctx->Extensions.ARB_texture_multisample; + break; default: error = GL_TRUE; } -- cgit v1.2.3