[Mesa-dev] [PATCH 04/15] i965: Don't require spans (swrast) support to consider a format FBO complete.

Eric Anholt eric at anholt.net
Thu Nov 17 19:05:14 PST 2011


On Thu, 17 Nov 2011 12:53:01 -0800, Ian Romanick <idr at freedesktop.org> wrote:
> On 11/15/2011 05:55 PM, Eric Anholt wrote:
> > We don't want to go writing GetRow/PutRow for every format required by
> > GL 3.0, when it's very hard to get those functions called, and in
> > every case we want to make swrast do direct mapping through
> > MapRenderbuffer anyway.
> >
> > This causes MESA_FORMAT_R11_G11_B10_FLOAT to be considered complete on gen6.
> > ---
> >   src/mesa/drivers/dri/intel/intel_fbo.c |   10 +++++++++-
> >   1 files changed, 9 insertions(+), 1 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> > index 74280dc..c1e7bad 100644
> > --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> > +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> > @@ -1309,12 +1309,20 @@ intel_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
> >   	 continue;
> >         }
> >
> > +      if (!intel->vtbl.render_target_supported(intel, irb->Base.Format)) {
> > +	 DBG("Unsupported HW texture/renderbuffer format attached: %s\n",
> > +	     _mesa_get_format_name(irb->Base.Format));
> > +	 fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
> > +      }
> > +
> > +#ifdef I915
> >         if (!intel_span_supports_format(irb->Base.Format) ||
> >   	  !intel->vtbl.render_target_supported(intel, irb->Base.Format)) {
> > -	 DBG("Unsupported texture/renderbuffer format attached: %s\n",
> > +	 DBG("Unsupported swrast texture/renderbuffer format attached: %s\n",
> >   	     _mesa_get_format_name(irb->Base.Format));
> >   	 fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
> >         }
> > +#endif
> >      }
> >   }
> >
> 
> Is this the right logic for i915?  As coded, the FBO will be unsupported 
> if either hardware or swrast can't handle it.  It seems like that could 
> be right, but I wanted to double check.

Yeah, it's the same logic as before for i915 supportedness, but since I
didn't actually delete the line I pulled out to the i965-and-i915 test,
the patch didn't make much sense.
-------------- 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/20111117/b2a47631/attachment.pgp>


More information about the mesa-dev mailing list