All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 82586] New: UBO matrix in std140 struct does not work
@ 2014-08-13 21:54 bugzilla-daemon
  2014-08-14  1:13 ` [Bug 82586] " bugzilla-daemon
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: bugzilla-daemon @ 2014-08-13 21:54 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1304 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=82586

          Priority: medium
            Bug ID: 82586
          Assignee: dri-devel@lists.freedesktop.org
           Summary: UBO matrix in std140 struct does not work
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: pavol@klacansky.com
          Hardware: Other
            Status: NEW
           Version: git
         Component: Drivers/Gallium/r600
           Product: Mesa

I am not sure if the problem is actually in my code, but I tested it on nVidia
driver and it worked (but their compiler might have a fix for it internally).

Here is vertex shader:

#version 330

layout(location = 0) in vec4 position;

layout(std140) uniform Matrices {
    mat4 model;
    mat4 view;
    mat4 projection;
} matrices;

out gl_PerVertex {
    vec4 gl_Position;
};

/* interpolate to compute normal in fragment shader */
out vec3 v_position;

void main(void)
{
    v_position = vec3(matrices.view * matrices.model * position);
    gl_Position = matrices.projection * matrices.view * matrices.model *
position;
}


If I use only one matrix from the uniform it works. I have printed UBOs values
and they are just identity matrices.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2601 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-17 12:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 21:54 [Bug 82586] New: UBO matrix in std140 struct does not work bugzilla-daemon
2014-08-14  1:13 ` [Bug 82586] " bugzilla-daemon
2014-08-14 13:12 ` bugzilla-daemon
2014-08-14 16:46 ` bugzilla-daemon
2014-08-14 20:35 ` bugzilla-daemon
2014-08-15  7:17 ` bugzilla-daemon
2014-08-15 15:13 ` bugzilla-daemon
2014-08-15 15:34 ` bugzilla-daemon
2014-08-16 20:34 ` bugzilla-daemon
2014-08-16 20:39 ` bugzilla-daemon
2014-08-17 10:33 ` bugzilla-daemon
2014-08-17 12:27 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.