PDA

View Full Version : FBO render to cubemap broken on catalyst 6.7?



santyhamer
08-11-2006, 04:29 PM
Hiya,

I upgraded my ATI9500 drivers from 6.5 to 6.7 and now I can't render to cubemap using FBOs....

This is the code i'm using...

-------------------------
FBO creation time:


glGenTextures(1,&rt.texID);
glGenFramebuffersEXT(1,&rt.fbo);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,rt.fbo);
glBindTexture(GL_TEXTURE_CUBE_MAP_ARB,rt.texID);

//Need to set here a filter indicating we are /are NOT going to use mipmaps. If not, a FRAMEBUFFER_UNSUPPORTED will be returned by glCheckFramebufferStatusEXT because we didn't defined a complete mipmap chain??

glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST );

GLenum i;
for ( i=0; i<6; ++i )
{
glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_X+i, 0, GL_RGB16, w, h, 0, GL_RGB, GL_UNSIGNED_SHORT, 0 );
glFramebufferTexture2DEXT ( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X+i, rt.texID, 0);
}

glGenRenderbuffersEXT(1,&amp;rt.fboDepth);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,rt.fboDe pth);
glRenderbufferStorageEXT ( GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, w, h );
glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, rt.fboDepth );

//Check if all attachments are correct
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if ( status!=GL_FRAMEBUFFER_COMPLETE_EXT )
{
//blah blah
}-------------------------
FBO render time:

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,rt.fbo);

glFramebufferRenderbufferEXT ( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rt.fboDepth );

GLenum f;
for ( f=0; f<6; ++f )
{
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_CO LOR_ATTACHMENT0_EXT,GL_TEXTURE_CUBE_MAP_POSITIVE_X +f,rt.texID,0);
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

.... draw each cubemap face....
}Do you notice something bad there? Well it works on ATI cat6.5 and NVIDIA. Crashes badly on cat.6.7 causing a big exception (attempt to write at 0x00000000 in ATI DLL driver file ). My PC is a Duron 1000, 1,5Gb RAM, ATI9500 64Mb AGP.

Also a petition for the ARB... Could you include in the FBO spec a render-to-cubemap CLEAR example please?

santyhamer
08-11-2006, 05:42 PM
More specifically brokes in address:

0x691efdd4

at

atioglxx.dll C:\WINDOWS\system32\atioglxx.dll N/A N/A No symbols loaded. 87 6.14.10.5949 19/07/2006 4:13 69000000-694F3000

Error message is

First-chance exception at 0x691efdd4 in mySample18.exe: 0xC0000005: Access violation writing location 0x00000000

and occurs when I do the

glFramebufferTexture2DEXT ( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X+i, rt.texID, 0 )

call with "i==0"

ofc if I go back to cat6.5 or use an NVIDIA card works... Btw I'm using WinXP SP2 32-bits I forgot to mention it.

Also tryed to use GL_RGB8 instead of that GL_RGB16 but nothing... crash is still there...

Also tested the code with the NVPerfKit with maximum validation... and got no errors with NVIDIA drivers so I assume is an ATI driver problem?

santyhamer
08-12-2006, 12:27 PM
btw, I tryed the Humus examples with Catalyst 6.7 and all crashes strangely.. Rollbacking to 6.5 or 6.6 works well.... I tryed with two different computers ( one with w2k ati 9800 and other with winXP ati 9500 ) and same result on both...

santyhamer
08-17-2006, 03:01 PM
Anybody having these problems too pls?

Humus
08-19-2006, 06:00 PM
I made a quick test a week ago and noticed a crash in one app using FBOs, but haven't had time to investigate yet.

santyhamer
08-19-2006, 08:30 PM
thx Humus for looking. If you need some test app or whatever to test just tell me, I'm desperated 8(

Humus
08-20-2006, 03:30 PM
A test app always helps. If you have one, please send it to epersson 'at' ati.com and I'll take a look at it.

santyhamer
08-20-2006, 08:30 PM
no matter Humus... Catalyst 6.8 solved the problem :D No longer crashes, thx