PDA

View Full Version : What ever happened to 16bit float pbuffers?



vhammer
06-12-2012, 05:05 PM
OK I've been off doing other things for several years and I've dusted off some old shader code that processes 16bit per channel images using a pbuffer. As it turns I can not obtain a pbuffer setting the channel bits to anything other than 8?? Uhmm 7 or 8 years ago this was not an issue....

So what's the way to render to a 16bit (or even 32bit) per channel target these days?

WGL_FLOAT_COMPONENTS_NV, 1
WGL_RED_BITS_ARB, 16
WGL_GREEN_BITS_ARB, 16
WGL_BLUE_BITS_ARB, 16
WGL_ALPHA_BITS_ARB, 16

Thx,

Vhammer

vhammer
06-12-2012, 05:15 PM
OK I guess FBO's are the way to go these days.

So can I do threaded data transfers to FBO's as is described with PBO's here:
http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0356-GTC2012-Texture-Transfers.pdf

dukey
06-13-2012, 02:58 AM
The worst part about pbuffers is, the buffer is on a separate opengl context, which is less than ideal. Means you have to set up display list sharing or some other features to make it work. FBO's really are the way to go.

vhammer
06-13-2012, 07:50 AM
Yes but with that you may be answering my followup question:
Perhaps since pbuffers have their own context they can run in a separate thread and you can do non-blocking transfers.... but if 16 & 32 bit per channel data formats are not supported for pbuffers then that would be a real shame as it's those formats we eat up the most transfer time.

The display list sharing is trivial it's just a parameter to wglCreateContextAttribsARB

I'll be playing around with this today to see if there is a way to do non blocking transfers with FBO's

aqnuep
06-13-2012, 07:53 AM
Yes but with that you may be answering my followup question:
Perhaps since pbuffers have their own context they can run in a separate thread and you can do non-blocking transfers.... but if 16 & 32 bit per channel data formats are not supported for pbuffers then that would be a real shame as it's those formats we eat up the most transfer time.
If you have only a single GPU then your draw commands will be anyhow serialized more or less.
Also, most GL commands are non-blocking, and even most of those that are blocking by default (like TexImage, TexSubImage, etc.), if you use PBOs then you can make them non-blocking.

vhammer
06-13-2012, 08:02 AM
[...]even most of those that are blocking by default (like TexImage, TexSubImage, etc.), if you use PBOs then you can make them non-blocking.
Yes that's what I'm after but where I'm stuck is how can I transfer my 16bit per channel float textures to a PBO (without losing precision) if the PBO only supports 8bit per channel?

aqnuep
06-13-2012, 08:04 AM
Yes that's what I'm after but where I'm stuck is how can I transfer my 16bit per channel float textures to a PBO (without losing precision) if the PBO only supports 8bit per channel?
What? PBOs are simple buffer objects that can store raw (i.e. arbitrary) data. PBOs are not limited to any format, bits per channel or whatever. You can have the exact same possibilities like with regular, blocking Tex[Sub]Image calls.

I think you've misunderstood: PBO stands for pixel buffer objects, not pbuffers.

vhammer
06-13-2012, 08:14 AM
I think you've misunderstood: PBO stands for pixel buffer objects, not pbuffers.
Ah... you are correct... that is exactly my misunderstanding! Thanks!!