Bug 84023

Summary: GLSL compiler bug in uniform buffer load lowering or optimizations
Product: Mesa Reporter: Maxim <ya.maxis11>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: c++ host

Description Maxim 2014-09-17 22:47:25 UTC
Created attachment 106468 [details]
c++ host

Today I tested how two uniform buffers work in mesa and find a bug, when unable to edit second buffer. It's happen when you uses values from uniform buffers to create vec4.

Vertex shader:
#version 330 core

uniform test_unif1
{
    float test1;
    float test2;
};

uniform test_unif2
{
    float test3;
    float test4;
};

in vec4 pos;
out vec4 fcolor;

void main(void)
{
    gl_Position = pos;
    fcolor = vec4(test1,test2,test3,test4);
}

test3 and test4 is unchangeable from c++ host. If I do this:

gl_Position = test4 * pos;
fcolor = vec4(test1,test2,test3,1.0f);

test3 and test4 will work ok. So I think it's a bug of driver.
Radeon 6480g + radeon 7470m. Ubuntu 14.10. Drivers from oibaf ppa.
Comment 1 Marek Olšák 2015-01-01 14:23:14 UTC
Piglit test:
http://lists.freedesktop.org/archives/piglit/2015-January/013893.html
Comment 2 Marek Olšák 2015-01-02 12:47:08 UTC
This bug seems to be Gallium-specific according to Chris Forbes.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.