glMapBufferARB problem with ATI card

My app runs fine on NVidia cards but some of the terrain tiles with the lowest lod are missing on my 9600SE.

The problem only occurs when I use mapbuffer, buffersubdata works fine.

Here’s the code:

		glBindBufferARB(GL_ARRAY_BUFFER_ARB, bufferObject[VArrayNum]);

		j=(TILE_SIZE/TILE_STEP)*(TILE_SIZE/TILE_STEP)*20;

		glBufferDataARB(GL_ARRAY_BUFFER_ARB, j, NULL, GL_STATIC_DRAW_ARB);

		pMeshV2 = (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);

		...fill buffer

		glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);

The problem occurs when TILE_SIZE is 128 and TILE_STEP is 16, so the buffer I’m creating is 1280 bytes.

I can fix the problem by making sure I never try to map a buffer that is 2kb or smaller. i.e. if I add the following line it fixes the problem.

if  (j<2049)  {j=2049;}

whereas

if  j<2048)  {j=2048;}

doesnt.

I have checked that I am not overfilling the buffer I am creating.

I can live with this but is it me or does this look like a driver bug?

I’m using catalyst 5.2

Do you have a small sample showing this behavior? If so, please send it to me at epersson ‘at’ ati.com and I’ll look at it. This could maybe be related to another bug report I got recently but for which I have nothing to go by except a guy told me he had “problems” with small VBOs.

Thanks for the reply. If/when I get time to write a sample app I’ll send it along.