On Wed, 2009-10-14 at 18:11 -0700, Brian Paul wrote:
> Patrice Mandin wrote:
> > Hello,
> > 
> > fbo_firecube does not work for me, because on nv30, color and
> > depth/stencil buffers must have same size. fbo_firecube asks a
> > GL_DEPTH_COMPONENT16 for depth, and attach it to a 32 bits color
> > buffer, which thus fails.
> > 
> > Not valid for nv30 (and lower hardware I think):
> > - 32 bits color buffer with 16 bits depth
> > - 16 bits color buffer with 24 depth +8 stencil
> > However, I could have
> > - 16 bits color buffer with 16 bits depth
> 
> Mmmm, OK.  Some other hardware supports mixing depths (such as 32-bit 
> RGBA + 16-bit Z).  Also note that GL_ARB_framebuffer_object relaxed 
> the requirement that all color buffers need to be the same 
> format/depth so we might want to expose that feature someday.
> 
> I guess we need a way to ask the driver if it can support mixed 
> depths.  The most flexible thing would be a new function such as
> 
> boolean
> pipe_context::validate_framebuffer(struct pipe_context *pipe,
>                                     const struct 
> pipe_framebuffer_state *fb);
>
> to ask the driver if the given framebuffer configuration is usable. 
> I'd hold off on that for now.

This implies that the state tracker needs to create the surfaces in
order to validate a color/depth format combination. It makes GL visual
enumeration and D3D capability exporting with gallium cumbersome,
needing to create tens of dummy surfaces at startup to find the
supported combinations.

If all hardware out there only has two cases -- either it supports
color/depth of different bit depths or not -- then a simple
pipe_screen::get_param() would be preferable IMO.

Same goes for support of color buffer of different sizes: it would be
better to know whether we can export GL_ARB_framebuffer_object or not
without having to create dummy surfaces.

I'm not sure if all hardware we care about falls withing these two
categories. My suspicion is that they do.

Jose


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to