Quantcast
Channel: AMD Developer Forums: Message List - OpenGL & Vulkan
Viewing all articles
Browse latest Browse all 631

several OpenGL 4.3 diver bugs concerning Comput Shaders

$
0
0

I just wanted to point out some driver bugs. I hunted them for 3 days. On my 780 everything works perfect.

 

Bug 1:

 

void glGetProgramResourceiv(GLuint program​, GLenum programInterface​, GLuint index​, GLsizei propCount​, const Glenum * props​, GLsizei bufSize​, GLsizei * length​, GLint * params​);






returns a negative number, when the property

props = GL_BUFFER_DATA_SIZE

is beeing queried for a

programInterface = GL_SHADER_STORAGE_BLOCK

which is larger than 64kb.

 

Up to 64kb it counts correctly, but with each byte you get higher, the number gets smaller again until it gets stuck at -16.

 

Bug 2:

 

glShaderStorageBlockBinding(...);

 

is beeing used to bind a shader storage buffer to a binding point of comput shader.

If I render  (e.g. glDraw(...)) something with a program that has a fragment shader after glShaderStorageBlockBinding() gets called, all shader storage bindings get disconnected and you can't rebind them.

All shader storage reads return 0 from that point on.

If I comment out the draw call everything is fine again.

 

Here is my Java code. It uses my own library, but it's clear what it does.

 

InterfaceBlockBuffer sourceBuffer = new InterfaceBlockBuffer(resourcePool, "SourceBuffer", BUFFER_USAGE.DYNAMIC_DRAW);
InterfaceBlockBuffer destBuffer= new InterfaceBlockBuffer(resourcePool, "DestBuffer", BUFFER_USAGE.DYNAMIC_DRAW);
sourceBuffer.shaderStorageBlockBindingr(Bindings.BUF_SOURCE);
destBuffer.shaderStorageBlockBinding(Bindings.BUF_DEST);
sourceBuffer.bufferSubData(mySourceData);


// ***** If this is commented out - it works *****
Joogl.setProgram(renderProgram);
Joogl.setVertexArray(someVertexArray);
Joogl.draw(DRAW_MODE.TRIANGLE_FAN, 0, 4);
// ***********************************************


Joogl.setProgram(copyProgram); // Copy from sourceBuffer to destBuffer
Joogl.compute(MAX_FACES, 1, 1);


destBuffer.getBufferData(myDestData);
// print out myDestData ... on so on
//myDestData all zero when render call is beeing made








 

System:

Core i5 750

AMD Radeon 6950

Windows 7 64

Driver Version: 14.4


Viewing all articles
Browse latest Browse all 631

Trending Articles