Bug 60706

Summary: [llvmpipe] piglit fbo-blending-formats GL_EXT_texture_snorm regression with llvm-3.3svn
Product: Mesa Reporter: Vinson Lee <vlee>
Component: OtherAssignee: Roland Scheidegger <sroland>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: jfonseca, sroland
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: http://llvm.org/bugs/show_bug.cgi?id=15239
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2013-02-12 00:52:35 UTC
mesa: 44a5d7371c97d71d7dc0f7e81bf0a91cf7add0e0 (master)

$ llvm-config --version
3.3svn

$ ./bin/fbo-blending-formats GL_EXT_texture_snorm -auto
Using test set: GL_EXT_texture_snorm
Testing GL_RED_SNORM
PIGLIT:subtest {'GL_RED_SNORM' : 'pass'}
Testing GL_R8_SNORM
PIGLIT:subtest {'GL_R8_SNORM' : 'pass'}
Testing GL_RG_SNORM
PIGLIT:subtest {'GL_RG_SNORM' : 'pass'}
Testing GL_RG8_SNORM
PIGLIT:subtest {'GL_RG8_SNORM' : 'pass'}
Testing GL_RGB_SNORM
PIGLIT:subtest {'GL_RGB_SNORM' : 'pass'}
Testing GL_RGB8_SNORM
PIGLIT:subtest {'GL_RGB8_SNORM' : 'pass'}
Testing GL_RGBA_SNORM
PIGLIT:subtest {'GL_RGBA_SNORM' : 'pass'}
Testing GL_RGBA8_SNORM
PIGLIT:subtest {'GL_RGBA8_SNORM' : 'pass'}
Testing GL_ALPHA_SNORM
PIGLIT:subtest {'GL_ALPHA_SNORM' : 'pass'}
Testing GL_ALPHA8_SNORM
PIGLIT:subtest {'GL_ALPHA8_SNORM' : 'pass'}
Testing GL_LUMINANCE_SNORM
PIGLIT:subtest {'GL_LUMINANCE_SNORM' : 'pass'}
Testing GL_LUMINANCE8_SNORM
PIGLIT:subtest {'GL_LUMINANCE8_SNORM' : 'pass'}
Testing GL_LUMINANCE_ALPHA_SNORM
PIGLIT:subtest {'GL_LUMINANCE_ALPHA_SNORM' : 'pass'}
Testing GL_LUMINANCE8_ALPHA8_SNORM
PIGLIT:subtest {'GL_LUMINANCE8_ALPHA8_SNORM' : 'pass'}
Testing GL_INTENSITY_SNORM
PIGLIT:subtest {'GL_INTENSITY_SNORM' : 'pass'}
Testing GL_INTENSITY8_SNORM
PIGLIT:subtest {'GL_INTENSITY8_SNORM' : 'pass'}
Testing GL_R16_SNORM
Probe at (53,0)
  Expected: 0.810000 0.000000 0.000000 1.000000
  Observed: 0.794366 0.000000 0.000000 1.000000
  when testing FBO result, blending with DST_COLOR.
PIGLIT:subtest {'GL_R16_SNORM' : 'fail'}
Testing GL_RG16_SNORM
Probe at (32,0)
  Expected: 0.480000 0.800000 0.000000 1.000000
  Observed: 0.495590 0.800012 0.000000 1.000000
  when testing FBO result, blending with CONSTANT_COLOR.
Probe at (53,0)
  Expected: 0.810000 0.360000 0.000000 1.000000
  Observed: 0.825587 0.375622 0.000000 1.000000
  when testing FBO result, blending with DST_COLOR.
Probe at (74,0)
  Expected: 0.760000 0.850000 0.000000 1.000000
  Observed: 0.791131 0.881130 0.000000 1.000000
  when testing FBO result, blending with SRC_COLOR.
Probe at (117,0)
  Expected: 0.760000 0.800000 0.000000 1.000000
  Observed: 0.791131 0.800012 0.000000 1.000000
  when testing FBO result, blending with SRC_ALPHA.
PIGLIT:subtest {'GL_RG16_SNORM' : 'fail'}
Testing GL_RGB16_SNORM
Probe at (32,0)
  Expected: 0.480000 0.800000 0.680000 1.000000
  Observed: 0.495590 0.800012 0.679983 1.000000
  when testing FBO result, blending with CONSTANT_COLOR.
Probe at (53,0)
  Expected: 0.810000 0.360000 0.560000 1.000000
  Observed: 0.825587 0.375622 0.560045 1.000000
  when testing FBO result, blending with DST_COLOR.
Probe at (74,0)
  Expected: 0.760000 0.850000 0.730000 1.000000
  Observed: 0.791131 0.881130 0.730003 1.000000
  when testing FBO result, blending with SRC_COLOR.
Probe at (117,0)
  Expected: 0.760000 0.800000 0.720000 1.000000
  Observed: 0.791131 0.800012 0.735557 1.000000
  when testing FBO result, blending with SRC_ALPHA.
PIGLIT:subtest {'GL_RGB16_SNORM' : 'fail'}
Testing GL_RGBA16_SNORM
Probe at (32,0)
  Expected: 0.480000 0.800000 0.680000 0.500000
  Observed: 0.495590 0.800012 0.679983 0.515580
  when testing FBO result, blending with CONSTANT_COLOR.
Probe at (53,0)
  Expected: 0.810000 0.360000 0.560000 0.700000
  Observed: 0.825587 0.375622 0.560045 0.731162
  when testing FBO result, blending with DST_COLOR.
Probe at (74,0)
  Expected: 0.760000 0.850000 0.730000 0.740000
  Observed: 0.791131 0.881130 0.730003 0.755577
  when testing FBO result, blending with SRC_COLOR.
Probe at (96,0)
  Expected: 0.850000 0.350000 0.600000 0.700000
  Observed: 0.881130 0.381146 0.615558 0.731162
  when testing FBO result, blending with DST_ALPHA.
Probe at (117,0)
  Expected: 0.760000 0.800000 0.720000 0.740000
  Observed: 0.791131 0.800012 0.735557 0.755577
  when testing FBO result, blending with SRC_ALPHA.
PIGLIT:subtest {'GL_RGBA16_SNORM' : 'fail'}
Testing GL_ALPHA16_SNORM
Probe at (53,0)
  Expected: 0.000000 0.000000 0.000000 0.700000
  Observed: 0.000000 0.000000 0.000000 0.715567
  when testing FBO result, blending with DST_COLOR.
Probe at (96,0)
  Expected: 0.000000 0.000000 0.000000 0.700000
  Observed: 0.000000 0.000000 0.000000 0.715567
  when testing FBO result, blending with DST_ALPHA.
PIGLIT:subtest {'GL_ALPHA16_SNORM' : 'fail'}
Testing GL_LUMINANCE16_SNORM
Probe at (53,0)
  Expected: 0.810000 0.000000 0.000000 1.000000
  Observed: 0.794366 0.000000 0.000000 1.000000
  when testing FBO result, blending with DST_COLOR.
PIGLIT:subtest {'GL_LUMINANCE16_SNORM' : 'fail'}
Testing GL_LUMINANCE16_ALPHA16_SNORM
Probe at (32,0)
  Expected: 0.480000 0.000000 0.000000 0.500000
  Observed: 0.495590 0.000000 0.000000 0.515580
  when testing FBO result, blending with CONSTANT_COLOR.
Probe at (53,0)
  Expected: 0.810000 0.000000 0.000000 0.700000
  Observed: 0.825587 0.000000 0.000000 0.731162
  when testing FBO result, blending with DST_COLOR.
Probe at (74,0)
  Expected: 0.760000 0.000000 0.000000 0.740000
  Observed: 0.791131 0.000000 0.000000 0.755577
  when testing FBO result, blending with SRC_COLOR.
Probe at (96,0)
  Expected: 0.850000 0.000000 0.000000 0.700000
  Observed: 0.881130 0.000000 0.000000 0.731162
  when testing FBO result, blending with DST_ALPHA.
Probe at (117,0)
  Expected: 0.760000 0.000000 0.000000 0.740000
  Observed: 0.791131 0.000000 0.000000 0.755577
  when testing FBO result, blending with SRC_ALPHA.
PIGLIT:subtest {'GL_LUMINANCE16_ALPHA16_SNORM' : 'fail'}
Testing GL_INTENSITY16_SNORM
Probe at (53,0)
  Expected: 0.810000 0.000000 0.000000 1.000000
  Observed: 0.794366 0.000000 0.000000 1.000000
  when testing FBO result, blending with DST_COLOR.
PIGLIT:subtest {'GL_INTENSITY16_SNORM' : 'fail'}
PIGLIT: {'result': 'fail' }


49f8825c49871ca956c7ed21b096f3835311f57e is the first bad commit
commit 49f8825c49871ca956c7ed21b096f3835311f57e
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Fri Feb 1 08:34:36 2013 -0800

    gallivm: fix typo in lp_build_mul_norm
    
    The signed case didn't do what the comment indicated. Should increase rounding
    precision (at the expense of performance since the former code was effectively
    a no-op).
    
    Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

:040000 040000 3f2996be29d9f8fd4f6f1f92d38f0c1eac9c76a2 527a115635b3c45dbd77529ed7ee7602adf6af71 M	src
bisect run success
Comment 1 Roland Scheidegger 2013-02-12 01:04:36 UTC
This is rather interesting, I guess this code deserves another look. I didn't quite do all the math how it should look like, just noticed the code as-is didn't make any sense. But 0.03 is definitely a very large error for a 16bit format that's around 10 bits...
Comment 2 Roland Scheidegger 2013-02-12 02:29:57 UTC
This actually still passes here and on a quick look the math looks right to me too. Is this llvm-3.3 specific?
Comment 3 Vinson Lee 2013-02-12 05:44:09 UTC
This regression is llvm-3.3 specific. The test passes with llvm-3.2 and llvm-3.1.

I've reported the regression to LLVM Bugzilla.
Comment 4 Jose Fonseca 2013-02-12 15:16:20 UTC
(In reply to comment #3)
> This regression is llvm-3.3 specific. The test passes with llvm-3.2 and
> llvm-3.1.
> 
> I've reported the regression to LLVM Bugzilla.

Thanks Vinson!
Comment 5 Jose Fonseca 2013-02-28 15:44:32 UTC
This has been fixed upstream. Thanks Roland, Vinson.

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.