[Mesa-dev] [PATCH] intel: FBOs with texture border are unsupported

Eric Anholt eric at anholt.net
Fri Feb 3 01:01:32 PST 2012


On Wed,  1 Feb 2012 10:31:23 -0700, "Ian Romanick" <idr at freedesktop.org> wrote:
> ---
>  src/mesa/drivers/dri/intel/intel_fbo.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> index 2ba43ac..62ed754 100644
> --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> @@ -746,6 +746,7 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
>  
>     for (i = 0; i < Elements(fb->Attachment); i++) {
>        struct gl_renderbuffer *rb;
> +      struct gl_texture_object *tex;
>        struct intel_renderbuffer *irb;
>  
>        if (fb->Attachment[i].Type == GL_NONE)
> @@ -762,6 +763,18 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
>  	 continue;
>        }
>  
> +      tex = fb->Attachment[i].Texture;
> +      if (tex != NULL) {
> +	 const unsigned face = fb->Attachment[i].CubeMapFace;
> +	 const unsigned level = fb->Attachment[i].TextureLevel;
> +
> +	 if (tex->Image[face][level]->Border) {
> +	    DBG("texture with border\n");
> +	    fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
> +	    continue;
> +	 }
> +      }

_mesa_get_attachment_teximage(struct gl_renderbuffer_attachment *att)
can make this shorter.  Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120203/1e00071d/attachment.pgp>


More information about the mesa-dev mailing list