nForce2 IGP issue with odd texture dimensions

Started by
7 comments, last by LeGreg 18 years, 7 months ago
While testing a new hardware-accelerated port of our 2D tiling engine (using Direct3D), I've run into a strange issue with a friend's nForce 2 integrated video chipset. It seems that the chipset is requiring all of our texture dimensions to be multiples (not powers) of two, with odd-sized dimensions causing totally corrupted rasterization. While the fix is a simple rounding up of the dimensions to the nearest even number (which in turn is only a performance concern when huge numbers of small textures are being displayed), I'd still prefer to be able to programatically detect whether the workaround is needed or not. The problem is that I can't find any reference to an "even texture dimensions" requirement in either Direct3D's or nVidia's documentation, which leads me to wonder if this issue is limited to just the IGP version of the GF2 chipset. If someone who's familiar with this issue could chime in it would be much appreciated, and if nobody's ever encounted such a requirement before I'll assume I'm doing something horribly wrong in my Direct3D calls. :)
- Daniel Roth, Programmer / Web Developer (www.starquail.com, www.cwu.edu)
Advertisement
Quote:Original post by Ramius
It seems that the chipset is requiring all of our texture dimensions to be multiples (not powers) of two, with odd-sized dimensions causing totally corrupted rasterization.


??? I dont understand!
Without special extensions a texture must be power of two; a power of two is also multiple of two.
Viceversa an odd size cannot be power of two.
Quote:Without special extensions a texture must be power of two


AFAIK this is only true for Voodoo-era cards, as even a Radeon 7200 supports non-power of two texture sizes (albeit with a couple of conditions). As we will only be supporting video chipsets released in the last 5-6 years or so I'm not too concerned about the actual power of two rule (though I am praying that the entirely-too-common Intel Extreme chipsets don't require it). :)

While our new engine works well across the entire Radeon line, the "even dimensions" rule that we discovered on the nForce2 IGP has me a bit concerned about our nVidia compatability. While I'm guessing that this requirement only affects GF2 and earlier chipsets (and possibly only the IGP versions), I'd feel safer it there was a way I could query for existence of this limitation at runtime.
- Daniel Roth, Programmer / Web Developer (www.starquail.com, www.cwu.edu)
D3DPTEXTURECAPS_NONPOW2CONDITIONAL


(caps)
Beware of the Mighty Hamster!
Quote:D3DPTEXTURECAPS_NONPOW2CONDITIONAL


According to the documentation I have (DirectX SDK 9.0 - Oct '04), four different criteria must be met if this flag is present (it is on the NF2 IGP :).

1) Texture addressing mode must be D3DTADDRESS_CLAMP (it is).
2) Texture wrapping must not be used (it's not).
3) Mipmapping must not be used (it's not).
4) The texture must not be stored in a compressed format (it's not).

If there is a fifth undocumented requirement along the lines of "texture dimensions must be multiples of two" then that would explain a lot, though so far I can't find any such references. =)
- Daniel Roth, Programmer / Web Developer (www.starquail.com, www.cwu.edu)
Further testing has revealed that only the texture width, and not height, needs to be rounded to a multiple of two in order to render properly on the NF2 IGP. For now I'll be leaving that hack permanently active in our engine, though if someone could shed more light on this issue it would be appreciated. =)
- Daniel Roth, Programmer / Web Developer (www.starquail.com, www.cwu.edu)
Are you sure you don't have multiples of two mixed up with powers of 2?

Multiples of two would be 2*x: 2, 4, 6, 8, 10, 12, etc..
Powers of two would be 2^x: 2, 4, 8, 16, 32, 64, 128, etc...
Quote:Are you sure you don't have multiples of two mixed up with powers of 2?


Yes, I'm sure. :)
- Daniel Roth, Programmer / Web Developer (www.starquail.com, www.cwu.edu)
Likely a limitation of the hw that cannot be worked around in the driver.

You can live with it.

This topic is closed to new replies.

Advertisement