PDA

View Full Version : PBO



yooyo
03-24-2004, 06:16 AM
Is there any docs about GL_EXT_pixel_buffer_object?
I really need this...

yooyo

paulc
03-24-2004, 06:26 AM
I had a cursory search for docs when I noticed the extension after installing the latest dets. Nothing on the sgi extension registry and I couldn't find it in the in the 1.5 spec pdf. I think its mentioned briefly in some Nvidia presentations but haven't been able to find the spec for it.

SeskaPeel
03-24-2004, 07:50 AM
NVidia guys are debugging some issues, and it should be released officially within "few months" they say ...
Maybe we'll have some overview in the registerd developer section ...

SeskaPeel.

yooyo
03-24-2004, 08:36 AM
Originally posted by paulc:
I had a cursory search for docs when I noticed the extension after installing the latest dets. Nothing on the sgi extension registry and I couldn't find it in the in the 1.5 spec pdf. I think its mentioned briefly in some Nvidia presentations but haven't been able to find the spec for it.All I need is few #define directives... The rest of job sholud be same as in VBO.

yooyo

Bozfr
03-24-2004, 08:50 AM
Just in case you didn't noticed, Case Everitt mentions PBO in its Opengl 2.0 presentation at GDC 2004 (see page 11 of OpenGL2.pdf, at Nvidia GDC 2004 presentations (http://developer.nvidia.com/object/gdc_2004_presentations.html) )

He says :

"PBO uses same API [as VBO], but has binding points for

- PIXEL_PACK_BUFFER
> glRealPixels(), glGetTexImage(),etc.

- PIXEL_UNPACK_BUFFER
> glTexImage*(), glDrawPixels(), etc. "Is this enough (with the latest dets) to use the extension ?

Maybe we will know more after the official NV40 launch (April 13th) ...

yooyo
03-24-2004, 12:58 PM
I got it... I have made a simple app that call glBindBufferARB using all possible params and check gl error after each call. I have found values for
GL_PIXEL_PACK_BUFFER and GL_PIXEL_UNPACK_BUFFER.

Extension work right now. I'll have to do some more tests, because there is no any doc's, but I suppose it very similar as VBO.



#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC yooyo

Bozfr
03-25-2004, 12:18 AM
Great !
Let us know if you got it right !

cass
03-25-2004, 10:26 AM
Wow, word travels fast. :-)

yooyo
03-25-2004, 01:50 PM
Originally posted by cass:
Wow, word travels fast. :-)Cass? Cass Everitt? nVidia?

Hampel
03-26-2004, 12:05 AM
@cass: Why is it a GL_EXT_* extension and not a GL_ARB_* extension?

yooyo
03-26-2004, 01:57 AM
@cass: Im trying to do streaming video in OpenGL.
Can PDR/PBO helps me? Any clue?

yooyo

SeskaPeel
03-26-2004, 06:34 AM
Originally posted by cass:
Wow, word travels fast. :-)Nowadays, it's good to have entry points with hardware vendors. Still, ATi is clearly missing something about this, whereas NVidia leads the way. Yet, they are (NVidia) still looking for a way to do this correctly, but a big thumbs up for great intention.

PBO provides a simple (hardware accelerated yet ?) way to map / unmap texture buffers for several tasks, as dynamic loading, but not for render to texture. We'll still have to wait for superbuffers or whatever names can be given to it.

SeskaPeel.

Hampel
03-28-2004, 11:08 PM
Why do we need two different targets GL_PIXEL_{PACK|UNPACK}_BUFFER_EXT?
Wouldn't one target GL_PIXEL_BUFFER_OBJECT_{EXT|ARB} be enough?
I think, GL_{STREAM|DYNAMIC|STATIC}_{DRAW|COPY|READ}_ARB are enough to differentiate between the different usage patterns.
For now, we can only use GL_{STREAM|DYNAMIC|STATIC}_DRAW_ARB with GL_VERTEX_BUFFER_OBJECT_ARB, and GL_STATIC_READ_ARB for GL_PIXEL_PACK_EXT, and GL_STATIC_DRAW_ARB for GL_PIXEL_UNPACK_EXT, right?
Wouldn't it then be better to use GL_VERTEX_BUFFER_STREAM_ARB, GL_VERTEX_BUFFER_DYNAMIC_ARB, GL_VERTEX_BUFFER_STATIC_ARB, GL_PIXEL_BUFFER_PACK_ARB, and GL_PIXEL_BUFFER_UNPACK_ARB, and forget about the usage pattern hint?

pkaler
03-29-2004, 11:30 AM
Originally posted by Hampel:
Why do we need two different targets GL_PIXEL_{PACK|UNPACK}_BUFFER_EXT?
Wouldn't one target GL_PIXEL_BUFFER_OBJECT_{EXT|ARB} be enough?
I think, GL_{STREAM|DYNAMIC|STATIC}_{DRAW|COPY|READ}_ARB are enough to differentiate between the different usage patterns.Read the NV_pixel_data_range spec. Read is assumed to be slow while write is not. So there are two buffers that are stored and then they can be synced whenever required.

cass
03-29-2004, 11:43 AM
Originally posted by yooyo:

Originally posted by cass:
Wow, word travels fast. :-)Cass? Cass Everitt? nVidia?Yep.

cass
03-29-2004, 11:51 AM
Originally posted by Hampel:
Why do we need two different targets GL_PIXEL_{PACK|UNPACK}_BUFFER_EXT?
Wouldn't one target GL_PIXEL_BUFFER_OBJECT_{EXT|ARB} be enough?
One target would have been enough, but two helps indicate that these are fundamentally different operations, often with different memory type requirements.

cass
03-29-2004, 12:27 PM
This is a nearly final version of the spec, though the list of contributors should now include Bill Licea-Kane and Brian Paul.

http://www.r3.nu/~cass/opengl/ext/GL_EXT_pixel_buffer_object.txt

Don't rely on this link being up-to-date in the future, but it should be enough to get you started...

Hope this helps.

Cass

yooyo
03-29-2004, 02:46 PM
10x cass
That's exactly I need!

yooyo

Bozfr
03-30-2004, 12:09 AM
Thanks a lot Cass.

I like specs with examples !!

yooyo
03-30-2004, 03:09 AM
Originally posted by cass:
This is a nearly final version of the spec, though the list of contributors should now include Bill Licea-Kane and Brian Paul.

http://www.r3.nu/~cass/opengl/ext/GL_EXT_pixel_buffer_object.txt
Hope this helps.

CassExample with streaming textures doesn't work properly. I have made a simple app that each frame upload one texture using code in your example. Sometimes there is a some glitches in texture. glMapBuffer always returns same pointer to PBO memory but previous glTexSubImage2D call didn't yet finished it's job. Result is overlapped texture data. Should glMapBuffer return another piece of safe AGP memory if previous operation are still in progress?

yooyo

Bozfr
03-30-2004, 05:56 AM
I have also used PBO successfully.
I have not encountered your problem yooyo, but I only call one glTexSubImage2D per frame, followed by a glFinish...

PBO Performances are not yet on par with PDR.

On a GeForce3, with a 1024x1024 texture, I get half the speed of PDR with PBO. Do you see the same numbers ?

I still have to test on a recent card (and with the 56.68 drivers of the GDC if I found them...)

yooyo
03-30-2004, 07:02 AM
Originally posted by Bozfr:
I have also used PBO successfully.
I have not encountered your problem yooyo, but I only call one glTexSubImage2D per frame, followed by a glFinish...
It works with glFinish.. but check your CPU usage with glFinish and w/o glFinish(). It's a BIG difference! Uploading 720x576x32bpp on my AGP4x system w/o glFinish takes 1.2 - 1.7 ms. With glFinish it takes 11-13 ms. CPU usage w/o glFinish is max 10%. With glFinish it is 100%.

For best performance I have to create 3-4 PBO's and 3-4 textures, and render textures few frames after it's upload.

yooyo

Corrail
03-30-2004, 07:07 AM
Does anyone know something about ATI? Will they support PBO too/are they allowed to?
Will PBO get ARB status?

cass
03-30-2004, 07:11 AM
Originally posted by Corrail:
Does anyone know something about ATI? Will they support PBO too/are they allowed to?
Will PBO get ARB status?The spec is being proposed for ARB status and OpenGL 2.0 core, so hopefully it'll be available on everybody's implementation soon.

Corrail
03-30-2004, 08:19 AM
Originally posted by cass:
The spec is being proposed for ARB status and OpenGL 2.0 core, so hopefully it'll be available on everybody's implementation soon.[/QB]Cool, thanks!

Zengar
03-31-2004, 03:44 AM
The specs are now released on nvidias website
Just for those one who haven't niticed ;)

cass
03-31-2004, 07:19 AM
http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_pixel_buffer_object.txt

For those of you that want to jump right to it.