pal1000 / mesa-dist-win

Pre-built Mesa3D drivers for Windows
MIT License
914 stars 80 forks source link

Issues with multiple shader attachments #170

Closed Arcnor closed 7 months ago

Arcnor commented 7 months ago

Hello, not sure if this should be reported here or upstream, but starting here as this is the package I'm using (thanks btw!)

I've tested a project locally that seem to have issues when the shaders use multiple shader attachments (i.e. more than one attachment is linked in the shader), but only if the shader is written like:

out vec4 color;
out vec4 normal;

In this case, and for some reason, the Mesa driver inverts the outputs (I tried different backends and it happens with all of them IIRC), so the shader writes the normals to the color attachment, and vice versa.

If I change the shader to look like:

layout(location = 0, index = 0) out vec4 color;
layout(location = 1, index = 0) out vec4 normal;

the problem goes away, so it seems Mesa is assigning the wrong location to the attachments for some reason.

I unfortunately cannot share the project, but hopefully this is enough for a resolution.

pal1000 commented 7 months ago

Please go upstream with this.

Arcnor commented 7 months ago

Done at https://gitlab.freedesktop.org/mesa/mesa/-/issues/10637

pal1000 commented 5 months ago

Try 24.0.5.