GL_ATI_memory_export

Has anybody ever heard of GL_ATI_memory_export? It should be supported on R5xx HW and as I tried, it really is. On the other hand, it isn’t in the extension list of my Radeon x1900 with Catalyst 6.11.

I tried googling for it, but with no success :frowning: . If somebody have an idea, what this extension is for, please point me in the right direction. At a glance it looks for me as somekind of R2VB in OGL.

There is no GL_ATI_memory_export in my extensions list. X1900 XT with 6.11…

But why not in list ?!
/*
** GL_ATI_memory_export
**
** Support:
** R500 : Supported
** All others : Not Supported
*/
#ifndef GL_ATI_memory_export
#define GL_ATI_memory_export

#define GL_EXPORT_STREAM0_ATI 0x6110
#define GL_EXPORT_STREAM1_ATI 0x6111
#define GL_EXPORT_STREAM2_ATI 0x6112
#define GL_EXPORT_STREAM3_ATI 0x6113

#define GL_EXPORT_STREAM_STRIDE_ATI 0x6114
#define GL_EXPORT_STREAM_OFFSET_ATI 0x6115

#define GL_EXPORT_BUFFER_ATI 0x6116

#define GL_EXPORT_BUFFER_BINDING_ATI 0x6117
#define GL_EXPORT_STREAM0_BUFFER_BINDING_ATI 0x6118
#define GL_EXPORT_STREAM1_BUFFER_BINDING_ATI 0x6119
#define GL_EXPORT_STREAM2_BUFFER_BINDING_ATI 0x611A
#define GL_EXPORT_STREAM3_BUFFER_BINDING_ATI 0x611B

typedef GLvoid (APIENTRY *PFNGLEXPORTSTREAMATIPROC)(GLenum stream, GLsizei offset, GLsizei stride);

typedef GLvoid (APIENTRY *PFNGLGETEXPORTSTREAMPARAMETERIVATIPROC)(GLenum stream, GLenum pname, GLint *params);
typedef GLvoid (APIENTRY *PFNGLGETEXPORTSTREAMPARAMETERFVATIPROC)(GLenum stream, GLenum pname, GLfloat *params);

#endif

It looks like stream out support, as in what the new g80 has. Where’d you find this at? Isn’t the R500 supposed to be the x360 graphics card (not the PC R5xx chips)?

yes, R500 should be xbox 360, but I tried to get function address of glExportStreamATI and I got a real one, so it’s supported in SW or HW, i don’t know because don’t know how to use this ext.

from glAIT.h.
http://www.ai.univ-paris8.fr/~dom/cours/gpu/files/glATI.h

Uff, so we get a view into what GL would be like if it adopted the D3D stream system.
Thank god we’re not going down that road.

but I tried to get function address of glExportStreamATI and I got a real one, so it’s supported in SW or HW
Couldn’t that just be a stub? I mean, if it’s not advertised in the extension string, then it’s not available/implemented, right?

Anyway, if it’s anything like D3D streams, then its just an alternative to glVertexPointer/glColorPointer/glNormalPointer…, where each stream number represents an attribute index. Personally, I find this a tad cleaner, not having so many entry points. In DX10 you can even bind all attributes to input/primitive assembler “slots” with one function call. I wouldn’t object to something like this in Mt. Evans.

Than again, maybe this is something entirely different.

I think it’s an extension in develop. See the enumerants values. All in range of 0x6000 and 0x611B. Now look at the beginning of glAti.h there is a warning:

/*
** IMPORTANT:
**
** All non-final extensions should use token enumerations in the range
** of 0x6000-0x7fff, as required by the OpenGL spec.
**
*/

And when it comes to a replacement for glVertexPointer/glColorPointer/glNormalPointer…, I must disagree, it’s clear that it isn’t for simple rendering. Firstly, the names of enums/functions have something to do with streams and EXPORT BUFFERS, then why it will be supported only on R500/R5xx HW?

Another thing, it looks like this isn’t a separate extension, I would bet, that it’s cooperate with VBO ar FBO, because there are too few functions.

Firstly, the names of enums/functions have something to do with streams and EXPORT BUFFERS, then why it will be supported only on R500/R5xx HW?
OK, but what’s an “export buffer”?

The R500 supports DX10 (being made for the Xbox2), and as such “buffers” have been generalized to an extent that includes vertex and index buffers, as well as shader constant buffers. I’m now beginning to think it’s for the latter, even though only 4 defined streams might seem to suggest some sort of FBO/MRT relationship.

But yet again, I could be totally wrong.

BTW, the R5xx line is not DX10; it’s still DX9. The R6xx line is DX10.

BTW, the R5xx line is not DX10; it’s still DX9.
My bad.

It is very likely that the extension defines just another bind target to which buffers can be bound similar to GL_PIXEL_PACK_BUFFER_ARB from PBO extension and GL_ARRAY_BUFFER from VBO extension because it has similar structure of enums.

If the extension operates in similar way to the VBO&PBO extensions, it might be used by something like (based on PBO example):

glGenBuffers(1, vertexBuffer);

// Bind buffer for export.

glBindBuffer(GL_EXPORT_BUFFER_ATI, vertex_buffer) ;
glExportStreamATI(GL_EXPORT_STREAM0_ATI, 0, sizeof(GLfloat*8)) ;
glExportStreamATI(GL_EXPORT_STREAM1_ATI, sizeof(GLfloat*4), sizeof(GLfloat*8));

// Render your stuff using shader with some special output variables added by this extensions.


// Bind buffer for use.

glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer );
glVertexPointer(4, GL_FLOAT, sizeof(GLfloat*8), BUFFER_OFFSET(0));
glVertexAttribPointer(10,4, GL_FLOAT, sizeof(GLfloat*8), BUFFER_OFFSET(sizeof(GLfloat*4)));

// Draw using the generated data.