Bug 45917 - [PNV] Regression in Piglit test general/two-sided-lighting-separate-specular
[PNV] Regression in Piglit test general/two-sided-lighting-separate-specular
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915
8.0
All Linux (All)
: medium normal
Assigned To: Paul Berry
:
Depends on:
Blocks: 42993
  Show dependency treegraph
 
Reported: 2012-02-10 20:06 UTC by Paul Berry
Modified: 2012-02-15 15:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Berry 2012-02-10 20:06:08 UTC
The Piglit test general/two-sided-lighting-separate-specular regressed on i915 (Pineview) due to the following commit:

commit 2e5a1a254ed81b1d3efa6064f48183eefac784d0
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Oct 7 12:26:50 2011 -0700

    intel: Convert from GLboolean to 'bool' from stdbool.h.
    
    I initially produced the patch using this bash command:
    for file in {intel,i915,i965}/*.{c,cpp,h}; do [ ! -h $file ] && sed -i
    's/GLboolean/bool/g' $file && sed -i 's/GL_TRUE/true/g' $file && sed -i
    's/GL_FALSE/false/g' $file; done
    
    Then I manually added #include <stdbool.h> to fix compilation errors,
    and converted a few functions back to GLboolean that were used in core
    Mesa's function pointer table to avoid "incompatible pointer" warnings.
    
    Finally, I cleaned up some whitespace issues introduced by the change.
    
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Acked-by: Chad Versace <chad@chad-versace.us>
    Acked-by: Paul Berry <stereotype441@gmail.com>
Comment 1 Paul Berry 2012-02-10 20:28:06 UTC
Patch sent to Mesa list for review:

From: Paul Berry <stereotype441@gmail.com>
Date: Fri, 10 Feb 2012 19:51:55 -0800
Subject: [PATCH] i915: Fix type of "specoffset" variable.

Commit 2e5a1a2 (intel: Convert from GLboolean to 'bool' from
stdbool.h.) converted the "specoffset" local variable (in
intel_tris.c) from a GLboolean to a bool.  However, GLboolean was the
wrong type for specoffset--it should have been a GLuint (to match the
declaration of specoffset in struct intel_context).

This patch changes specoffset to the proper type.

Fixes piglit test general/two-sided-lighting-separate-specular.
Comment 2 Ian Romanick 2012-02-15 15:05:10 UTC
Fixed on 8.0 branch by:

commit e55f2d97f61420f6004c60be4238799f7a35b440
Author: Paul Berry <stereotype441@gmail.com>
Date:   Fri Feb 10 19:51:55 2012 -0800

    i915: Fix type of "specoffset" variable.
    
    Commit 2e5a1a2 (intel: Convert from GLboolean to 'bool' from
    stdbool.h.) converted the "specoffset" local variable (in
    intel_tris.c) from a GLboolean to a bool.  However, GLboolean was the
    wrong type for specoffset--it should have been a GLuint (to match the
    declaration of specoffset in struct intel_context).
    
    This patch changes specoffset to the proper type.
    
    Fixes piglit test general/two-sided-lighting-separate-specular.
    
    This is a candidate for stable branches.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45917
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit 6b0a07f9ce844a8a96e2583bd37ed8453bf151c6)