Bug 9996

Summary: KIL instruction broken on r300
Product: Mesa Reporter: Oliver McFadden <z3ro.geek>
Component: Drivers/DRI/r300Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: high    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: tri-kil.txt
Dump of tri-mov's indirect buffers when using the blob.
Dump of tri-kil's indirect buffers when using the blob.
Diff between tri-mov's and tri-kil's indirect buffers.

Description Oliver McFadden 2007-02-16 04:22:32 UTC
The KIL instruction is broken on R300 and causes an assertion. You can trigger
this with the tri-kil demo included with Mesa:

tri-kil: r300_state.c:1310: r300_setup_textures: Assertion `tmu_mappings[unit] >= 0' failed.
Comment 1 Oliver McFadden 2007-02-16 04:27:23 UTC
Created attachment 8751 [details]
tri-kil.txt

Added log of running tri-kil with vertex and fragment program dumping enabled.
Comment 2 Oliver McFadden 2007-02-27 22:54:56 UTC
I recently got iba-2 to work for me thanks to aet's help on #dri-devel, so I'll
attach a dump of tri-kil's indirect buffers from the blob soon, probably later
tonight.

I'd like to get this working, the KIL instruction can be quite useful as an
optimization.
Comment 3 Oliver McFadden 2007-02-28 23:10:20 UTC
Created attachment 8920 [details]
Dump of tri-mov's indirect buffers when using the blob.
Comment 4 Oliver McFadden 2007-02-28 23:10:53 UTC
Created attachment 8921 [details]
Dump of tri-kil's indirect buffers when using the blob.
Comment 5 Oliver McFadden 2007-02-28 23:12:06 UTC
Created attachment 8922 [details]
Diff between tri-mov's and tri-kil's indirect buffers.
Comment 6 Oliver McFadden 2007-02-28 23:20:52 UTC
It seems that using the KIL instruction does in fact require a TEX lookup, the
folllowing is added when looking at the diff.

+packet0 R300_PFS_TEXI_0(4620)=00010001

Also, the other other intsructions are changed, and one appears to be OR with a
constant, as well as a few other changed. Someone who knows more about this
should probably take a look. I think it might not be too hard to get this to
work for someone who really understands it. :)
Comment 7 Nicolai Hähnle 2008-06-01 04:34:34 UTC
The KIL instruction should work now (commit d9c7c5f071f5bf2a7516d877c9ab84b2b2b91779). Basically, at least one texture unit has to be enabled for KIL to work, even if there isn't actually a texture behind it.
Comment 8 Adam Jackson 2009-08-24 12:25:58 UTC
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.