Bug 20874 - [i965]incorrect rendering when run mesa demos/shadowtex
[i965]incorrect rendering when run mesa demos/shadowtex
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
Other Linux (All)
: medium normal
Assigned To: Ian Romanick
Depends on:
  Show dependency treegraph
Reported: 2009-03-26 02:00 UTC by liuhaien
Modified: 2009-05-14 02:21 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

screenshot (609.81 KB, image/png)
2009-03-26 02:00 UTC, liuhaien
xorg.0.log (78.59 KB, text/plain)
2009-03-26 02:01 UTC, liuhaien
xorg conf file (3.97 KB, text/plain)
2009-03-26 02:01 UTC, liuhaien

Note You need to log in before you can comment on or make changes to this bug.
Description liuhaien 2009-03-26 02:00:10 UTC
Created attachment 24264 [details]

System Environment:
Host:		x-gm965
Arch:		x86_64
Platform:		GM965
OSD:		Fedora release 10 
Kernel_version:		2.6.29-rc8
Libdrm:		(master)c9cfeaa5542e08381a8144d0a5bd96036a19082f
Mesa:		(mesa_7_4_branch)14a794300e9d548e7426836b1dea1150e07199d0
Xserver:		(server-1.6-branch)60c161545af80eb78eb790a05bde79409dfdf16e
Xf86_video_intel:		(2.7)e2465249a90b9aefe6d7a96eb56a51fde54698a0
Kernel:       (for-airlied)a2e785c32b886dd7f0289d1cf15fc14e9c81bc01

Bug detailed description:
  startx,then run mesa demos/shadowtex, we will see a incorrect shadow rendering in the display, you can see it in the attached screenshot. In the screenshot, the left one is the correct rendering with software , and the right one is incorrect.

Reproduce steps:
Comment 1 liuhaien 2009-03-26 02:01:00 UTC
Created attachment 24265 [details]
Comment 2 liuhaien 2009-03-26 02:01:22 UTC
Created attachment 24266 [details]
xorg conf file
Comment 3 Ian Romanick 2009-05-11 18:03:06 UTC
Pressing "i" to display the depth image shows that the depth image, which is rendered via a framebuffer object, is upside down.  There have been a bunch of changes to Mesa master to fix problems with incorrect coordinate origin for FBO rendering.  We'll have to track down the correct patch and cherry-pick it over to the mesa_7_4_branch.
Comment 4 Ian Romanick 2009-05-13 14:18:30 UTC
Fixed by the following commit in mesa_7_4_branch:

commit ec863602f2f8567958ad187dcb567a2752dd4f46
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Jan 29 11:07:14 2009 -0700

    i965: fix render to FBO/texture orientation bugs
    Anytime we're not rendering to the default/window FBO, need to invert
    rendering, not just when rendering to a texture.  Otherwise, if a FBO
    consists of a mix of textures and renderbuffers the up/down orientation
    was inconsistant.
    Fixes shadowtex.c bad rendering.
    (cherry picked from commit ba367f68ccacf255f78ac0c8dd066e64bbb1e5c2)
Comment 5 liuhaien 2009-05-14 02:21:20 UTC
verified against:
Libdrm:         (master)8b8e20e0f9900fae23baee55a91533a739c1a3ec
Mesa:           (master)10c4a10b979bddd099287dec5b69243c2ade8ade
Xserver:                (master)f3c61377d0fb1f09a18833995556fc9ffd11e097
Kernel:             (for-linus)79f11c19a396e8cea7dad322dcfb46c0a8517fe6