From: Corbin S. <mos...@gm...> - 2010-03-13 02:20:16
|
On Fri, Mar 12, 2010 at 5:20 PM, Jose Fonseca <jfo...@vm...> wrote: > Because if you have a huge vertex buffer and you only draw few indices you may choose to upload to VRAM only the vertices actually referred. Applications do this. And for certain hardware uploads are very slow, so it is an worthwhile optimization. Sure, not saying that it's not. > Efficiency is just or more important goal than principles like "state tracker should sanitize". There is hardware that can handle buffers with out of bounds indices without crashing. The APIs we expose also make the same promise. In such situation the shortcomings on one hardware should not be taxed to all. Oh, it's not a hardware limitation. If the vert and elt indices aren't clamped, then an attacker could theoretically retrieve bits of VRAM/GTT he shouldn't be allowed to peek at. In order to prevent this, the radeon kernel module requires that I set those clamps, and that they be within the bounds of the various buffers being used for rendering. I wouldn't call it a shortcoming so much as a security consideration. I've pushed a revert of the original patch, and an r300g patch that, while not perfect, covers the common case that Wine hits. ~ C. -- Only fools are easily impressed by what is only barely beyond their reach. ~ Unknown Corbin Simpson <Mos...@gm...> |