[Bug 82586] New: UBO matrix in std140 struct does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux