Bug 45975 - [Gen4 + ILK] render with pointcoord will fail to render
Summary: [Gen4 + ILK] render with pointcoord will fail to render
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Yuanhan Liu
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 19:01 UTC by zhao jian
Modified: 2012-05-28 01:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description zhao jian 2012-02-12 19:01:40 UTC
System Environment:
--------------------------
Platform:     Ironlake
Mesa:        (master)c565ff60d6fce8c3402e60e6475c03717b297965

Bug detailed description:
-------------------------
When rendering with pointcoord on Ironlake platforms, it will fail to render correctly. 

Reproduce steps:
-------------------------
1. xinit
2. run cases using pointcoord
Comment 1 Yuanhan Liu 2012-02-17 00:05:25 UTC
Change the title, since this issue also existed on Gen4 platforms.
Comment 2 Yuanhan Liu 2012-03-06 21:39:12 UTC
Fixed by the following commit:

----
commit 43af02ac731dac7d80f7e47feb0c80e4da156769
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date:   Mon Feb 27 15:46:32 2012 +0800

    i965: handle gl_PointCoord for Gen4 and Gen5 platforms
    
    This patch add the support of gl_PointCoord gl builtin variable for
    platform gen4 and gen5(ILK).
    
    Unlike gen6+, we don't have a hardware support of gl_PointCoord, means
    hardware will not calculate the interpolation coefficient for you.
    Instead, you should handle it yourself in sf shader stage.
    
    But badly, gl_PointCoord is a FS instead of VS builtin variable, thus
    it's not included in c.vue_map generated in VS stage. Thus the current
    code doesn't aware of this attribute. And to handle it correctly, we
    need add it to c.vue_map manually to let SF shader generate the needed
    interpolation coefficient for FS shader. SF stage has it's own copy of
    vue_map, thus I think it's safe to do it manually.
    
    Since handling gl_PointCoord for gen4 and gen5 platforms is somehow a
    little special, I added a lot of comments and hope I didn't overdo it ;)
    
    v2: add a /* _NEW_BUFFERS */ comment to note the state flag dependency
        and also add the _NEW_BUFFERS dirty mask (Eric).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45975
    Piglit: glsl-fs-pointcoord and fbo-gl_pointcoord
    
    NOTE: This is a candidate for stable release branches.
    
    Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>


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.