On Thu, Oct 22, 2009 at 1:31 PM, Brian Paul <[email protected]> wrote:
> Alex Deucher wrote:
>>
>> On Thu, Oct 22, 2009 at 11:40 AM, Brian Paul <[email protected]> wrote:
>>>
>>> Nicolai,
>>>
>>> I made some changes on the texformat-rework branch last night.  Could
>>> you re-test?  There may still be issues but I'll work with you to fix
>>> them.
>>>
>>
>> I did a quick test of the branch on r600.  openarena works ok.
>> However demos/teapot, rain, engine, and tests/zcomp, zdrawpix,
>> zreaddraw all segfault with the following:
>>
>> GL_VERSION = 1.4 Mesa 7.7-devel
>> GL_RENDERER = Mesa DRI R600 (RS780 9610) 20090101  TCL DRI2
>> radeonSetSpanFunctions: bad format: 0x0003
>> radeonSetSpanFunctions: bad format: 0x0003
>> radeonSetSpanFunctions: bad format: 0x001C
>> Segmentation fault
>
> Does the attached patch help?

Yes, that fixes the segfaults.  The tests/z* tests fail to render
correctly though.  r600 span code probably needs to be changed to deal
with the new depth format changes.

Alex

>
> -Brian
>
>
> diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c
> b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> index 21007d8..096ded2 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
> @@ -280,14 +280,14 @@ radeon_create_renderbuffer(GLenum format,
> __DRIdrawablePrivate *driDrawPriv)
>             rrb->base._BaseFormat = GL_DEPTH_COMPONENT;
>            break;
>        case GL_DEPTH_COMPONENT24:
> -           rrb->base.Format = MESA_FORMAT_Z32;
> -           rrb->base.DataType = GL_UNSIGNED_INT;
> -            rrb->base._BaseFormat = GL_DEPTH_COMPONENT;
> +           rrb->base.Format = MESA_FORMAT_S8_Z24;
> +           rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
> +            rrb->base._BaseFormat = GL_DEPTH_STENCIL;
>            break;
>        case GL_DEPTH24_STENCIL8_EXT:
>            rrb->base.Format = MESA_FORMAT_S8_Z24;
>            rrb->base.DataType = GL_UNSIGNED_INT_24_8_EXT;
> -            rrb->base._BaseFormat = GL_STENCIL_INDEX;
> +            rrb->base._BaseFormat = GL_DEPTH_STENCIL;
>            break;
>        default:
>            fprintf(stderr, "%s: Unknown format 0x%04x\n", __FUNCTION__,
> format);
> diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c
> b/src/mesa/drivers/dri/radeon/radeon_span.c
> index 9cdcde1..2add8c3 100644
> --- a/src/mesa/drivers/dri/radeon/radeon_span.c
> +++ b/src/mesa/drivers/dri/radeon/radeon_span.c
> @@ -848,9 +848,9 @@ static void radeonSetSpanFunctions(struct
> radeon_renderbuffer *rrb)
>  {
>        if (rrb->base.Format == MESA_FORMAT_RGB565) {
>                radeonInitPointers_RGB565(&rrb->base);
> -       } else if (rrb->base.Format == MESA_FORMAT_RGBA8888) { /* XXX */
> +       } else if (rrb->base.Format == MESA_FORMAT_XRGB8888) {
>                radeonInitPointers_xRGB8888(&rrb->base);
> -       } else if (rrb->base.Format == MESA_FORMAT_RGBA8888) {
> +       } else if (rrb->base.Format == MESA_FORMAT_ARGB8888) {
>                radeonInitPointers_ARGB8888(&rrb->base);
>        } else if (rrb->base.Format == MESA_FORMAT_ARGB4444) {
>                radeonInitPointers_ARGB4444(&rrb->base);
> @@ -858,7 +858,7 @@ static void radeonSetSpanFunctions(struct
> radeon_renderbuffer *rrb)
>                radeonInitPointers_ARGB1555(&rrb->base);
>        } else if (rrb->base.Format == MESA_FORMAT_Z16) {
>                radeonInitDepthPointers_z16(&rrb->base);
> -       } else if (rrb->base.Format == GL_DEPTH_COMPONENT32) { /* XXX */
> +       } else if (rrb->base.Format == MESA_FORMAT_X8_Z24) {
>                radeonInitDepthPointers_z24(&rrb->base);
>        } else if (rrb->base.Format == MESA_FORMAT_S8_Z24) {
>                radeonInitDepthPointers_s8_z24(&rrb->base);
>
>

------------------------------------------------------------------------------
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