Currently, the use of a texture rectangle causese a tcl fallback, which is not necessary. In fact, there are 2 easy ways to avoid it: 1) do the texcoord translation on the fly when copying the vertices - this would work for sw tnl and hw tnl just the same. In fact, I consider the current solution with its own texrect stage overkill, we need to copy the coords twice for no good reason, since the coord translation is fixed we should probably just do it when uploading. I think though texgen would be broken with that solution for hw tcl. So... 2) the better solution would probably be to just use the texture matrix for the coord translation (if it's already active, fix it up, otherwise enable it). Obviously this only works if hw tcl is active, though just fixing the coords up when uploading may in fact be faster (not sure, does using the texture matrix even come with a performance hit at all?). This solution should work for texgen too I suppose however. btw note that the current solution does not do projective texturing at all for some reason, as the q coord is simply ignored. Should be easy to fix though...
Created attachment 3413 [details] [review] remove texrect fallback, enable texgen for r/q coords Ok here's something to play with. This patch kills the texrect tcl fallback, and at the same time tries to fix issues with (tcl) texcoord/texgen/texmat handling. Unfortunately, I can't test it right now, any volunteers (I did get projtex to work with some quick hack, as well as get correct texcoords for texrect with another quick hack, but I don't have the card here now to test)? It's based on lots of assumptions, so even apart from coding errors I wouldn't be surprised if it doesn't quite work correctly - in theory this should even fix ut2k3 shadow projectors (though I'm not sure 2 texture units are enough to get them enabled at all).
Created attachment 3473 [details] [review] new patch, fixes two typos The original patch had two important typos, this one works much better. I only got the chance to test it very briefly, but if noone else tests it I'm going to submit it anyway. Results seemed very encouraging: texrect, projtex work with hw tcl. ut2k3 shadow projectors work with hw tcl. From the texgenmix test, the two mixed cases at the bottom right do not work (that is expected - the other mixed texgen case gets lucky and hits a fallback). All 3 non-texgen tests work, as do all 3 texgen tests - with the caveat that the test with only s/t texgen enabled only works with tcl_mode set to 1, but not 2. I think that's a bug within the vtxfmt code, maybe the single texcoord which is emitted there causes trouble.
Commited to cvs.
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.