Bug 54142 - Mesa: User error: GL_INVALID_OPERATION
Summary: Mesa: User error: GL_INVALID_OPERATION
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 06:01 UTC by Alexandre Demers
Modified: 2012-08-28 11:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The culprit shader (1.49 KB, text/plain)
2012-08-28 06:33 UTC, Laurent carlier
Details

Description Alexandre Demers 2012-08-28 06:01:24 UTC
Download and compile GL3_parallax_DoF from http://www.autistici.org/encelo/prog_gldemos.php

Nothing is displayed in the demo and the following error message is thrown in the terminal:
Mesa: User error: GL_INVALID_OPERATION in glUseProgram(program 1 not linked)
Mesa: User error: GL_INVALID_OPERATION in glGetUniformLocation(program not linked)


With mesa git f9767dac9a06aad93a9d61d108055ad673498bf8
drm git 7080bfdfd9b6c5f003daaef37ae9c329f2d46a6c
kernel 3.6.0-rc2

Using HD6950
Comment 1 Laurent carlier 2012-08-28 06:33:53 UTC
Created attachment 66199 [details]
The culprit shader
Comment 2 Laurent carlier 2012-08-28 06:34:54 UTC
When adding more verbosity:

Loading shaders/first.frag
0:45(11): error: assignment to read-only variable 'lightDir'
error: linking with uncompiled shaderLoading shaders/second.vert
Comment 3 Laurent carlier 2012-08-28 07:20:53 UTC
"A varying variable must be written on a vertex shader, where we compute the value of the variable for each vertex. In the fragment shader the variable, whose value results from an interpolation of the vertex values computed previously, can only be read."

lightDir is a varying that was write in the vertex shader, so it can only be read in the fragment shader


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.