[Mesa-dev] [PATCH 05/37] meta: added _mesa_meta_decompress_texture_image()

Eric Anholt eric at anholt.net
Mon Aug 15 15:35:48 PDT 2011


On Mon, 15 Aug 2011 16:05:51 -0600, Brian Paul <brian.e.paul at gmail.com> wrote:
> On Mon, Aug 15, 2011 at 3:43 PM, Ian Romanick <idr at freedesktop.org> wrote:
> >> +   /* Create/bind FBO/renderbuffer */
> >> +   if (decompress->FBO == 0) {
> >> +      _mesa_GenFramebuffersEXT(1, &decompress->FBO);
> >> +      _mesa_GenRenderbuffersEXT(1, &decompress->RBO);
> >> +      _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, decompress->FBO);
> >> +      _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, decompress->RBO);
> >> +      _mesa_FramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
> >> +                                       GL_COLOR_ATTACHMENT0_EXT,
> >> +                                       GL_RENDERBUFFER_EXT,
> >> +                                       decompress->RBO);
> >> +   }
> >> +   else {
> >> +      _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, decompress->FBO);
> >> +   }
> >> +
> >> +   if (destDataType == GL_SIGNED_NORMALIZED) {
> >> +      rbFormat = GL_RGBA32F;
> >> +   } else {
> >> +      rbFormat = GL_RGBA;
> >> +   }
> >
> > This bit seems odd.  Is GL_RGBA32F the right choice?  Won't this fail on
> > hardware that can do SIGNED_NORMALIZED but not float rendering?
> 
> That bit wasn't in my original patch series.  I'm not sure if it's
> even legal to do a glGetTexImage() of a compressed texture and get
> back signed normalized values.  I'd have to do some digging through
> specs.

Yeah, we'd get in trouble here for !EXT_texture_float.  This was the fix
for EXT_texture_snorm regression in fbo-generatemipmap-formats of
compressed formats once that changed to doing metaops+GetTexImage.  Not
sure how to handle it -- we need the signed values, but getting them
through the pixel path as signed bytes was awful.

Thoughts?
-------------- 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/20110815/b0cb0be2/attachment-0001.pgp>


More information about the mesa-dev mailing list