Created attachment 16865 [details] test case The bug only exists with mesa_7_0 branch. When draw bitmap, fog is not applied. With master branch, attached test case output: pixel: 0.713726 0.450980 0.274510 pixel: 0.188235 0.149020 0.725490
After remove i915 driver, the bug does not exist. So it is i915 bug. Also exists with i965.
The bug only exists with i915 driver. i965 driver has no this bug.
Created attachment 17021 [details] [review] patch to set fragment fogc attribute for the span Hi, Brian I915 adds some extra instructions to do fog, then turn off FogOption, which causes the FOGC attribute of the span isn't set on mesa_7_0_branch. This patch fixes this issue, but I am not sure whether it breaks other driver. Could you take a look? Thanks Haihao
Created attachment 17024 [details] [review] patch to set fragment fogc attribute for the span
(In reply to comment #3) > Created an attachment (id=17021) [details] > patch to set fragment fogc attribute for the span > I915 adds some extra instructions to do fog, then turn off FogOption, which > causes the FOGC attribute of the span isn't set on mesa_7_0_branch. This patch > fixes this issue, but I am not sure whether it breaks other driver. Could you > take a look? I don't think this is entirely correct. A (user supplied) fragment program could use FOGC for something else than fog.
(In reply to comment #5) > > I915 adds some extra instructions to do fog, then turn off FogOption, which > > causes the FOGC attribute of the span isn't set on mesa_7_0_branch. This patch > > fixes this issue, but I am not sure whether it breaks other driver. Could you > > take a look? > > I don't think this is entirely correct. A (user supplied) fragment program > could use FOGC for something else than fog. > This patch just initializes the FOGC attribute of the span if FOGC is used as an input. If a fragment used FOGC for something, it still need to initialize this attribute, right?
(In reply to comment #6) > (In reply to comment #5) > > > I915 adds some extra instructions to do fog, then turn off FogOption, which > > > causes the FOGC attribute of the span isn't set on mesa_7_0_branch. This patch > > > fixes this issue, but I am not sure whether it breaks other driver. Could you > > > take a look? > > > > I don't think this is entirely correct. A (user supplied) fragment program > > could use FOGC for something else than fog. > > > This patch just initializes the FOGC attribute of the span if FOGC is used as > an input. If a fragment used FOGC for something, it still need to initialize > this attribute, right? You're right I didn't look closely enough. May cause (little) unnecessary work to be done but if fog is applied or not is not determined by this, so should probably be ok.
OK, I've commited a cleaned-up version of the patch. Though, it doesn't make any difference in the above-attached test program, and I don't see how it would effect the i915 driver.
(In reply to comment #8) > OK, I've commited a cleaned-up version of the patch. Though, it doesn't make > any difference in the above-attached test program, Need to define GL_GLEXT_PROTOTYPES when compiling this test case. > and I don't see how it would > effect the i915 driver.
fixed in mesa_7_0_branch (8261c40bb9b689d05e80e1423eb8d9f13b49b2b8)
Mass version move, cvs -> git
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.