PDA

View Full Version : glCopyTexSubImage2D slow



marco_dup1
11-11-2004, 02:43 PM
HI

I copy the colorbuffer of a pbuffer to a texture.
The texture had the internal format of RGBA8 and the framebuffer is the same format. I tought that there should be no conversion. Buts its really slow. It's the nvidia linux 66.29. I really have no clue that could be wrong.

tnx, marco

ZbuffeR
11-13-2004, 11:31 AM
Looks like the problem I describe (and solve) here :
http://www.chez.com/dedebuffer/

marco_dup1
11-13-2004, 05:09 PM
Originally posted by ZbuffeR:
Looks like the problem I describe (and solve) here :
http://www.chez.com/dedebuffer/ That can't be because its also very slow if I copy from the backbuffer. Also there is no render to texture extension under linux. As far a I know Doom 3 is using this function so this must be my fault. I really have no clue.

marco_dup1
11-14-2004, 06:41 AM
I have changed the internal format to
RGBA_FLOAT16_ATI and the pbuffer to the same sizes but its very slow too. I can't see whats wrong.

marco_dup1
11-14-2004, 12:33 PM
Maybe you are right. I have changed some setting and its fast with the backbuffer but slow with the pbuffer. My settings are not special:

attribs[0] = GLX_DOUBLEBUFFER
attribs[1] = double_buffer
attribs[2] = GLX_RED_SIZE
attribs[3] = red_size
attribs[4] = GLX_GREEN_SIZE
attribs[5] = green_size
attribs[6] = GLX_BLUE_SIZE
attribs[7] = blue_size
attribs[8] = GLX_ALPHA_SIZE
attribs[9] = alpha_size
attribs[10] = GLX_DRAWABLE_TYPE
attribs[11] = GLX_PBUFFER_BIT
attribs[12] = GLX_FLOAT_COMPONENTS_NV
attribs[13] = float_buffer
attribs[14] = 0

I don't know what is happen. Maybe its a driver bug.

ZbuffeR
11-14-2004, 02:18 PM
Maybe your settings are not special, but what are the actual values ?
I suppose you already did it, but try removing everything, then adding only some params etc.

It may well be a driver bug anyway.

Korval
11-14-2004, 09:16 PM
Since you're copying something that Doom3 does, and that it is fast for them but slow for you, you may have to consider that the driver is detecting Doom3 and doing its copy texture operation in a special way. A way that other applications can't get access to.

I'm not saying that you should stop looking for the problem. But it is something that you may have to consider.

rgpc
11-15-2004, 12:00 AM
GLX_FLOAT_COMPONENTS_NVDoesn't that make the pbuffer a floating point buffer? Which presumably makes the buffer relatively large (as compared to a normal RGBA8 buffer - 4x the data?) And a float buffer is not RGBA8 (as far as I know) - which would mean data conversion during the copy.

Is it valid on NV hardware to use an internal format of RGBA_FLOAT16_ATI? (Just curious, I haven't looked at float buffers).

What if your pbuffer were not setup to be a float buffer? Set it up as a plain RGBA8 buffer and see what difference it makes.

marco_dup1
11-15-2004, 05:19 AM
Originally posted by rgpc:

GLX_FLOAT_COMPONENTS_NVWhat if your pbuffer were not setup to be a float buffer? Set it up as a plain RGBA8 buffer and see what difference it makes.No, there are no differences. I use a float texture too. Its no difference. The problem ist the copy from the pbuffer to the texture.

rgpc
11-15-2004, 12:29 PM
Is there a Linux equivalent to ShareLists()? If so, have you called it? (I had a look in my Red book and couldn't spot anything that looked like ShareLists)

marco_dup1
11-15-2004, 12:56 PM
Originally posted by rgpc:
Is there a Linux equivalent to ShareLists()? If so, have you called it? (I had a look in my Red book and couldn't spot anything that looked like ShareLists)The lists, objects are shared, you say it in the context creation. glXCreateNewContext last argument is the context to share. I don't know how its handled under wgl, haven't used windows since 10 years.