Am Thursday 15 October 2009 22:50:21 schrieb Brian Paul:
> Nicolai Hähnle wrote:
> > I sent the last mail a little too quickly: This seems to affect only
> > certain programs, in particular I have seen it with Sauerbraten; Compiz
> > on the other hand seems to work.
>
> I've committed another change that should fix that.

Thank you. Indeed, the games and applications I've tested all work fine.

Unfortunately, there's a problem with swrast access (in particular ReadPixels, 
which causes readPixSanity to fail). Can you clarify what each of the fields 
::_BaseFormat, ::InternalFormat and ::Format are supposed to mean, and how 
they interact with GetRow, PutValues, etc.?

My observations:
1. Your change to radeon_span.c indicates that you want GetRow to depend on 
::Format, but ::Format does not distinguish between stencil and depth buffer 
access when Format == MESA_FORMAT_S8_Z24.

2. The assertion in s_readpix.c:122 gets triggered because rb->InternalFormat 
== GL_DEPTH24_STENCIL8 happens.

3. The stencil read code expects GetRow to return only stencil values even 
when ::Format is one of the mixed depth/stencil formats.

So what is really the way to go forward? It seems radeon_span.c should 
probably use ::_BaseFormat to decide whether Mesa wants depth or stencil 
access functions, use ::InternalFormat to decide the data type that Mesa wants 
to use (e.g. GL_DEPTH24_STENCIL8 and GL_DEPTH_COMPONENT24 both mean 24-bit Z 
values if _BaseFormat == GL_DEPTH_COMPONENT, whereas GL_DEPTH_COMPONENT16 
means 16-bit Z values) and then pick the particular family of access functions 
based on the ::Format. Is that correct?

Are there invariants of the form: "If Format == MESA_FORMAT_S8_Z24, then 
InternalFormat is always GL_DEPTH24_STENCIL8"?

In addition to that, the mentioned assertion in s_readpix.c:122 needs to be 
relaxed in any case.

cu,
Nicolai

> Thanks for testing!
>
> -Brian



------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to