Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Thread Tools
Old 08-12-04, 12:54 PM   #1
Frederico Abraham
Join Date: Aug 2004
Location: Brazil, Rio de Janeiro
Posts: 2
Send a message via ICQ to snakeloco
Unhappy EXT_pixel_buffer_object

I am beggining to experiment the EXT_pixel_buffer_object extension in one of my projects.
My application performs a series of CPU memory manipulation followed by glDrawPixels commands.
The pseudo code is similar to one of the examples provided in the extension docs found in SGI extension registry:

void *pboMemory, *drawdata;

int N = number of drawpixels() operations per frame
int screensize = W*H*3*N // RGB, enough space for all the drawpixel buffers.

// create and bind buffer object
GenBuffers(1, &mybuffer);
BindBuffer(PIXEL_UNPACK_BUFFER_EXT, mybuffer);

drawdata = getNextData();

while (drawdata) {
// map the texture image buffer
pboOffset = GetOffset(drawdata); // one offset per draw data

// modify (sub-)buffer data (performing a CPU operation here)
memcpy(pboMemory+pboOffset, drawdata, W*H*3);

// unmap the texture image buffer
if (!UnmapBuffer(PIXEL_UNPACK_BUFFER_EXT)) {
// Handle error case

// draw pixels
glDrawPixels(w,h,GL_BGR_EXT,GL_UNSIGNED_BYTE,pboOf fset);

drawdata = getNextData();


I want to parallelize the CPU operation and the drawpixels by using this extension.
Following the previous discussion about the NV_pixel_data_range extension, I expect that
when i issue the glDrawPixels command, it immediately returns, starting some kind of fast transfer to the graphics card asynchronously, with me on the application side ensuring that the mapped memory will not be changed while the transfer occurs.

What is actually happening is that the glDrawPixels operation is taking very long, hurting performance instead of what I expected. Taking very long meaning gettimeofday() differences.

What am I missing here?
I am using Linux kernel 2.4.22-smp, driver 61.06.
The same behaviour happened on a Windows XP machine with the latest driver (61.13 i think)

Thank you
-- Fred
snakeloco is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 02:35 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.