Bug 37738 - [snb regression] broken border blends
Summary: [snb regression] broken border blends
Status: RESOLVED DUPLICATE of bug 28924
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-30 02:40 UTC by Chris Wilson
Modified: 2011-06-05 21:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The photo1 about flashing spots when run padman (302.46 KB, image/jpeg)
2011-05-30 20:09 UTC, meng
Details
The photo2 about flashing spots when run padman (338.82 KB, image/jpeg)
2011-05-30 20:12 UTC, meng
Details

Description Chris Wilson 2011-05-30 02:40:30 UTC
b126a0c0cb30b1e2f2df1953fe14d8596d1cf4f7 is the first bad commit
commit b126a0c0cb30b1e2f2df1953fe14d8596d1cf4f7
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Nov 2 09:11:17 2010 -0700

    i965: Add support for correct GL_CLAMP behavior by clamping coordinates.
    
    This removes the stupid strict-conformance fallback code I broke when
    adding ARB_sampler_objects.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36572
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)

This introduces outlines around the overlays in World of Padman, for example.
Comment 1 meng 2011-05-30 20:03:29 UTC
Hi, Chris. Test with mesa(master)76056510bcd35b6b5607b572c0c0ff47b5c5e7e2 on our Sugarbay, flashing spots come out and some trees become dimness when running padman every time.When spots come out, maybe disappear soon, then come out again.Pls see attached photos. 
It’s not only mesa master branch, but also 7.10 branch. I had filed a bug 35165. So I want to confirm whether the problems are the same to yours.
Comment 2 meng 2011-05-30 20:09:56 UTC
Created attachment 47345 [details]
The photo1 about flashing spots when run padman
Comment 3 meng 2011-05-30 20:12:32 UTC
Created attachment 47346 [details]
The photo2 about flashing spots when run padman
Comment 4 Chris Wilson 2011-05-31 10:42:44 UTC
Meng, the checkerboard pattern is a much older bug that I've seen present (but transient) in all games since first turning on my SNB back in December - I had hoped I was an isolated case since no one else seemed to have noticed it!

The bug that b126a0 introduces is the faint outline around the status box in the bottom left corner of your photos, for instance.
Comment 5 Eric Anholt 2011-06-01 13:21:24 UTC
Can you stuff some debugging in and see if the application is actually using GL_CLAMP?  If so, I expect this to just be a dup of the "ilk/snb fail at border color".
Comment 6 Chris Wilson 2011-06-02 01:29:45 UTC
Eric, you were spot on.

The outlines disappear if I use TEXCOORDMODE_CLAMP for GL_CLAMP:

diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 5de39aa..c060c7f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -51,6 +51,7 @@ translate_wrap_mode(GLenum wrap, bool using_nearest)
    case GL_REPEAT: 
       return BRW_TEXCOORDMODE_WRAP;
    case GL_CLAMP:
+      return BRW_TEXCOORDMODE_CLAMP;
       /* GL_CLAMP is the weird mode where coordinates are clamped to
        * [0.0, 1.0], so linear filtering of coordinates outside of
        * [0.0, 1.0] give you half edge texel value and half border
Comment 7 Eric Anholt 2011-06-05 21:31:50 UTC

*** This bug has been marked as a duplicate of bug 28924 ***


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.