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

Re: SSBOs in geometry shader

$
0
0

Okay guys, i figured out a problem.

 

Geometry shader:

 

layout(location = 0) in  VertexData {

vec2 texCoord;

flat int drawId; // from vertex's gl_DrawIDARB

} vert_in[];

 

struct ObjectData {

bool someValue;

};

 

 

layout(std430) readonly buffer MyBuffer {

ObjectData perObject[];

};

...

 

void main() {

if(perObject[vert_in[0].drawId].someValue) {} // causes an error

}

 

If i write

int id = vert_in[0].drawId;

ObjectData data = perObject[id];

 

if(data.someValue) {}


error now dissapears

Seems amd driver bug.


Also i have another one problem.

I want to pass drawId from vertex shader to geometry shader and then to fragment shader.

If i'm using my perObject in vertex shader all is ok. Then i'm passing drawId to geometry shader all is ok too. But when i try to access perObject in fragment shader my application crashes. On nvidia all is working normally.

It's another amd driver bug. Is there any driver developer to investigate and fix it?

I really love and production but there bugs are annoying to me.


Viewing all articles
Browse latest Browse all 631

Trending Articles