All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@freedesktop.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 82586] New: UBO matrix in std140 struct does not work
Date: Wed, 13 Aug 2014 21:54:47 +0000	[thread overview]
Message-ID: <bug-82586-502@http.bugs.freedesktop.org/> (raw)


[-- 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

             reply	other threads:[~2014-08-13 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 21:54 bugzilla-daemon [this message]
2014-08-14  1:13 ` [Bug 82586] UBO matrix in std140 struct does not work 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-82586-502@http.bugs.freedesktop.org/ \
    --to=bugzilla-daemon@freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.