PDA

View Full Version : CubeEnvMap with MipMap on Radeon



opla
02-07-2002, 02:10 AM
I found a nasty bug with Radeon card: they don't support mipmapping with a GL_TEXTURE_CUBE_MAP_ARB texture.
I tried with a Radeon1 64M DDR VIVO and Radeon 8500 64M (driver released 31 jan 2002)
what it should be like (http://oplayez.free.fr/ATI/ATInomipmap.png)
the bug, using mipmapping (http://oplayez.free.fr/ATI/ATIbugmipmap.png)

I think it's an hardware limitation because the pb occurs with DirectX too !

So, thanks to ATI, we all have to do in our code:

if (strncmp(GLRendererString, "Radeon", 6) == 0)
{//Radeon 1 and 8500 doesn't support mipmap on CubeEnvMap (same pb for DirectX)
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
else
{
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
}

[This message has been edited by opla (edited 02-07-2002).]

dginsburg
02-07-2002, 03:51 AM
Could you send a copy of the app to dginsbur@ati.com?

It is true that the original Radeon does not support mip'd cube maps, although it should punt to the closest non mip'd min filter (e.g. if you ask for trilinear you would get bilinear). You shouldn't see any corruption unless you depend on it being mip mapped.

As for the Radeon 8500, mip'd cube maps should work just fine. So that sounds like you might be seeing a driver bug...

Please send the app and I'll take a look at it. Thanks.

-- Dan

opla
02-07-2002, 05:23 AM
I can't send you the app, it belongs to the company i'm working for.

To show you that it's an hardware problem, I changed the CubeEnvMap example from the DirectX 8 SDK. You can download it here (http://oplayez.free.fr/ATI/CubeMap.zip)

with a GeForce2 MX, it works fine with 8 mipmap levels.
with a Radeon 8500, it fails with 8 mipmap levels but works with no mipmap.

look for the "using ATI Radeon ?" string in cubemap.cpp



[This message has been edited by opla (edited 02-07-2002).]

raster
02-07-2002, 06:26 AM
Mipmapping doesn't also work if you use ATI_fragment_shader to sample from textures with GL_REG_*_ATI.

Both cube map and 2D I think.

opla
02-07-2002, 06:54 AM
raster, you seem to have a good experience with ATI cards.
can you tell me if there's a size limit for GL_ATI_element_array ?
where can I found the spec for GL_ATI_element_array ?

Mahjii
02-07-2002, 07:29 AM
Does anyone know if there is a generic way to detect in GL if a card doesn't support mip-mapping for various texture-targets?

I know that Radeon1 doesn't support mips for 3d texture as well, but it accepts the data when we upload it-

ehart
02-07-2002, 07:43 AM
Originally posted by raster:

Mipmapping doesn't also work if you use ATI_fragment_shader to sample from textures with GL_REG_*_ATI.

Both cube map and 2D I think.




This shouldn't be the case, and I have used this in the past without seeing any issues. Could you send a sample that shows the problem?

-Evan (ehart @ ati.com)

opla
02-07-2002, 09:01 AM
I found the ATI_element_array spec, it's at http://www.ati.com/na/pages/resource_centre/dev_rel/sdk/RadeonSDK/Html/Info/ATI_element_array.txt
Why isn't it available at http://oss.sgi.com/projects/ogl-sample/registry/ ?

I have another problem, using glDrawElementArrayATI(), some vertices are missing (works fine without glDrawElementArrayATI()), is there a size limit for this "index buffer" ?

Humus
02-07-2002, 12:05 PM
Aha!

Thanks to this topic I found out a problem I've seen with the whole 6xxx series of drivers, which I've also notified ATi about. I had a very simple app with a cubemap which ran very fast with 3286 drivers, but with the 6xxx series drivers I got a constant 40fps. If I changed th cubemap to something else like a 3d texture though it would run fast.
For some reason Jeff at ATi couldn't reproduce the problem over there, it ran fast for him. Now after reading this topic I tried using plain GL_LINEAR instead and now cubemaps are fast again. I guess it's time for ATi to look over their cubemap driver code http://www.opengl.org/discussion_boards/ubb/wink.gif

dginsburg
02-08-2002, 12:19 PM
Humus,

I reproduced the problem you were seeing with mip'd cubemaps. There were indeed two issues (a corruption and performance problem), both of which I just checked in a fix for. The fix will be in a future driver release. Thanks for reporting the bug...

-- Dan

Humus
02-09-2002, 02:03 AM
Nice to hear! http://www.opengl.org/discussion_boards/ubb/smile.gif

opla
02-11-2002, 11:15 AM
I confirm that the mipmaped CubeEnvMap bug (present in GL_VERSION 1.3.2483) is fixed in GL_VERSION 1.3.2552