Pixel Buffer Object

Pixel Buffer Object

Requests for features in the spring code.

Moderator: Moderators

Locked
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Pixel Buffer Object

Post by Argh »

Can we have that as part of the OpenGL supported callouts, please? I'd like to see what happens, when all Unit textures get stored in PBOs and are using DMA. My guess is that it will substantially improve texture throughput per render frame, at the cost of being incompatible with Intel 945, etc., so I'd like to just include it within the Unit shader Gadget's flow, and see what impact it makes on total performance.

If it's already available, and it's just not cited in the Wiki, let me know if there is any example code available.

Oh, and also, after reading the nVidia documentation, it appears that we'd see a pretty big throughput improvement by sending textures BRGA, instead of RGBA, and then shifting the values per fragment on the GPU (I even suspect, given what they had to say, that this probably applies if you aren't using PBO, so this might offer a way to substantially improve the speed of the ARB shaders as well, but I don't know enough about this yet). GL_BGRA, to be specific.

We can't do that in Lua ATM, because that OpenGL texture parameter isn't available.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Pixel Buffer Object

Post by aegis »

what does the pbo setting do?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Pixel Buffer Object

Post by Argh »

It turns on PBO within the engine for map rendering, I assume (I haven't read that code, mind you, so it may be something that does nothing atm- I see no performance change with it on).

I love the description, though... it has nothing to do with texture memory per se at all, just throughput. If we want to do something serious about texture memory, then we need a "texture detail" setting, like most commercial games have, that forces mips down when distance > some constant, or just skips the top mip entirely, so everything's a lot uglier but texture throughput is a lot smaller.

However, it probably isn't performing anything like it should be, because the textures aren't being stored as GL_BGRA and then corrected by the ARB fragment shader (i.e., a second ARB shader should be used, to take full advantage of this on GPUs capable of supporting PBO in the first place).
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Pixel Buffer Object

Post by jamerlan »

http://en.wikipedia.org/wiki/Pixel_buffer

This article says: "The pBuffer has been deprecated and replaced by FBOs (Framebuffer Objects)."

It's better to turn on this option in spring or not? If i Use GeForce 560ti?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

sage goes in the email field

Post by smoth »

it's considered bad practice to bump a 2+ year old thread
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: sage goes in the email field

Post by jamerlan »

smoth wrote:it's considered bad practice to bump a 2+ year old thread
I asking not only thread author, but a whole community. And I just want to keep information about pixel buffer in one place to reduce chaos.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Pixel Buffer Object

Post by knorke »

i noted no change in fps with turning it on or off
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: Pixel Buffer Object

Post by jamerlan »

knorke wrote:i noted no change in fps with turning it on or off
Another wikipedia article says:
The Direct3D method (SetRenderTarget()) is convenient, while prior versions of OpenGL required manipulating pixel buffers (P-buffers). This was cumbersome and risky: if the programmer's codepath was different from that anticipated by the driver maker, the code would have fallen back to software rendering, causing a substantial performance drop. However, widespread support for the "frame buffer objects" extension, which provided an OpenGL equivalent of the Direct3D method, successfully addressed this shortcoming, and the "render target" feature of OpenGL brought OpenGL up to par with Direct3D in this respect.
http://en.wikipedia.org/wiki/Comparison ... d_Direct3D

seems that spring should drop pixel buffer implementation or use frame buffer objects instead.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Pixel Buffer Object

Post by jK »

jamerlan, don't talk about stuff you don't know, please ...

If you really want to make judgments about these things, you have to learn OpenGL. Searching for random names on wikipedia and making assumptions based on this, fails totally.

Thx, lock?
Locked

Return to “Feature Requests”