Bug 13585 - Texture not rendered correctly when fragment program ATTRIB defined but not used
Texture not rendered correctly when fragment program ATTRIB defined but not used
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
x86-64 (AMD64) Linux (All)
: medium normal
Assigned To: Default DRI bug account
Depends on:
  Show dependency treegraph
Reported: 2007-12-10 05:04 UTC by Richard Goedeken
Modified: 2009-08-24 12:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Richard Goedeken 2007-12-10 05:04:13 UTC
This problem was observed on an Intel X3100 graphics adapter (965GM chipset), using the i915 DRM driver.  Mesa was version 7.0.1-7.fc8.  This particular issue only shows up on my intel 965 hardware - the exact same code running on an Nvidia Geforce 6600 looks correct. I am working on an N64 emulator which programmatically generates fragment programs for rendering.  Sometimes it defines an ATTRIB which is not used in any instructions later in the code, and in this case the color value for every fragment in a polygon is the same - I assume this is because the texture coordinates are not being updated.  The following fragment program exhibits the error:


TEMP t0;

TEMP t1;

TEMP comb;

TEMP comb2;

ATTRIB shade = fragment.color;
TEX t0, fragment.texcoord[0], texture[0], 2D;

TEX t1, fragment.texcoord[1], texture[1], 2D;
MOV comb.rgb, t0
MOV comb.a, t0
MOV result.color, comb;

When running this fragment program, the texture is not displayed correctly; only a single color is used for all fragments.  To work around this bug, either use the 'shade' ATTRIB in an instruction (such as change 'MOV comb.a, t0' to 'MOV comb.a, shade') or remove the ATTRIB line.
Comment 1 Richard Goedeken 2008-01-31 08:49:50 UTC
This actually belongs under the Mesa product, in the DRI/i965 component.  I believe this may be a duplicate of bug #10767.
Comment 2 Zou Nan hai 2008-03-05 17:56:20 UTC
This bug should be a duplicate of bug #10767, which has been fixed by haihao.
Comment 3 ajax at nwnk dot net 2009-08-24 12:28:35 UTC
Mass version move, cvs -> git