Mesa (master): glsl: add missing sceneColor field to gl_{Front, Back}LightModelProduct

Kenneth Graunke kwg at kemper.freedesktop.org
Fri Aug 20 13:02:22 PDT 2010


Module: Mesa
Branch: master
Commit: c108a7927d1dad9e0f641a0ec5a7387fb2626156
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c108a7927d1dad9e0f641a0ec5a7387fb2626156

Author: Luca Barbieri <luca at luca-barbieri.com>
Date:   Wed Aug 18 12:52:55 2010 +0200

glsl: add missing sceneColor field to gl_{Front, Back}LightModelProduct

According to both GLSL 1.20 and 4.0, these are a struct with one field
called "sceneColor".

Fixes a crash on loading in FlightGear.

---

 src/mesa/program/ir_to_mesa.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index fafc620..1fbf574 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -1079,9 +1079,9 @@ static const struct {
    {"gl_LightModel", NULL,
     {STATE_LIGHTMODEL_AMBIENT, 0}, SWIZZLE_XYZW, false},
 
-   {"gl_FrontLightModelProduct", NULL,
+   {"gl_FrontLightModelProduct", "sceneColor",
     {STATE_LIGHTMODEL_SCENECOLOR, 0}, SWIZZLE_XYZW, false},
-   {"gl_BackLightModelProduct", NULL,
+   {"gl_BackLightModelProduct", "sceneColor",
     {STATE_LIGHTMODEL_SCENECOLOR, 1}, SWIZZLE_XYZW, false},
 
    {"gl_FrontLightProduct", "ambient",



More information about the mesa-commit mailing list