Bug 3084 - Mesa clamps vertex colors passed as inputs to software vertex shading
Summary: Mesa clamps vertex colors passed as inputs to software vertex shading
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 13:59 UTC by Aapo Tahkola
Modified: 2006-08-23 11:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Aapo Tahkola 2005-04-20 13:59:53 UTC
Specs dont seem to mention anything about this.
I believe colors should either not be clamped or result in a undefined behaviour
as modern hardware cannot handle this.
Comment 1 Ian Romanick 2005-07-07 12:49:50 UTC
Can you elaborate on this, please?  Previous to the ARB_color_buffer_float,
there were serveral places in the pipeline where colors are explicitly clamped
to [0,1.0].  That extension adds serveral enables so that the clamping can be
disabled, if desired.

Section 2.14 of the OpenGL 2.0 spec is very clear about this.  On page 57 (71 of
the PDF) it says, "After lighting, RGBA colors are clamped to the range [0,1]."
 This is reiterated in section 2.14.6.  Page 118 (132 of the PDF) in section 3.6
contains similar language regarding scaling of DrawPixels data by
COLOR_TABLE_BIAS.  Page 127 (141 of the PDF) contains an explicit clamp in the
diagram of the pixel transfer pipeline.

Is there some other clamping that you are seeing?  If not, I'm going to close
this as NOTABUG.  Thanks.
Comment 2 Ian Romanick 2005-07-07 14:48:07 UTC
I spoke with Aapo on IRC, and he clarified things a bit.  It seems that Mesa is
clamping the initial values of vertex.color for vertex programs.  Based on the
OpenGL 2.0 spec, I believe that behavior to be incorrect.  At the top of page 22
(page 36 of the PDF), it says:

"Version of the Color and SecondaryColor commands that take floating-point
values accept values nominally between 0.0 and 1.0....Values outside [0,1] are
not clamped."
Comment 3 Aapo Tahkola 2006-08-23 11:57:30 UTC
Something very different was it.


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.