<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx</link><description>There are many reasons for differences between platforms , and several ways an API designer can try to rationalize such things. Some features fundamentally don't exist, and are not practical to emulate. Earlier Radeon graphics cards do not support TextureAddressMode</description><dc:language>en</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9972337</link><pubDate>Wed, 03 Mar 2010 18:44:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9972337</guid><dc:creator>Shawn Hargreaves - MSFT</dc:creator><description>&lt;p&gt;&amp;gt; Instead of checking cap-bits, why not *request* certain capabilities.&lt;/p&gt;
&lt;p&gt;That makes the opt-in more explicit, but it doesn't really fix the underlying problem if there are so many optional features that it isn't clear how to navigate your algorithms through the resulting maze. What do you do when you request 50 optional features, but only 20 of them come back as supported? How do you test all the crazy number of possible permutations that can result?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9972337" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9972063</link><pubDate>Wed, 03 Mar 2010 10:39:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9972063</guid><dc:creator>Adam</dc:creator><description>&lt;p&gt;That lack of the border caps bit being set on old ATI cards is not because the &amp;nbsp;cards can't do border addressing at all.&lt;/p&gt;
&lt;p&gt;I'm not sure if XNA will let you do this, but with D3D9 on ATI cards that don't have the cap bit set, if you ignore that and set the render state anyway it will usually work correctly.&lt;/p&gt;
&lt;p&gt;That doesn't work with the debug runtimes enabled, because they stop the call getting through to the driver.&lt;/p&gt;
&lt;p&gt;According to the discussion linked below the cap bit is disabled because there are some edge cases where border doesn't work according to spec, so the driver would fail WHQL testing if the cap bit was set.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://discussms.hosting.lsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0406E&amp;amp;L=DIRECTXDEV&amp;amp;D=0&amp;amp;1=DIRECTXDEV&amp;amp;9=A&amp;amp;J=on&amp;amp;d=No+Match%3BMatch%3BMatches&amp;amp;z=4&amp;amp;P=454"&gt;http://discussms.hosting.lsoft.com/SCRIPTS/WA-MSD.EXE?A2=ind0406E&amp;amp;L=DIRECTXDEV&amp;amp;D=0&amp;amp;1=DIRECTXDEV&amp;amp;9=A&amp;amp;J=on&amp;amp;d=No+Match%3BMatch%3BMatches&amp;amp;z=4&amp;amp;P=454&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9972063" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971957</link><pubDate>Wed, 03 Mar 2010 05:08:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971957</guid><dc:creator>AR</dc:creator><description>&lt;p&gt;When you enumerated that list of possibilities, it gave me another possible idea:&lt;/p&gt;
&lt;p&gt;Instead of checking cap-bits, why not *request* certain capabilities.&lt;/p&gt;
&lt;p&gt;This removes the possibility that you use a function without checking for capability (and end up with an exception or a mess when you port it). It also means the runtime could report what you're using (&amp;quot;XNA: this won't run on Zune&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971957" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971770</link><pubDate>Tue, 02 Mar 2010 20:49:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971770</guid><dc:creator>JoelBennett</dc:creator><description>&lt;p&gt;Shawn: That's one thing that amazed me about the Halo port for PC - it'd run on some amazingly low hardware (like Intel integrated graphics). &amp;nbsp;I was impressed that they even went that low with things. &amp;nbsp;It ran like a dog, but it did run.&lt;/p&gt;
&lt;p&gt;Oh, the amazing things you find out when bored in a college class and the person before you had installed Halo on the machine...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971770" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971582</link><pubDate>Tue, 02 Mar 2010 16:36:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971582</guid><dc:creator>Shawn Hargreaves - MSFT</dc:creator><description>&lt;p&gt;&amp;gt; And here I was rooting for cap bits for being the least surprising.&lt;/p&gt;
&lt;p&gt;Caps bits suffer from what Raymond Chen likes to call the &amp;quot;what if everybody did that&amp;quot; problem.&lt;/p&gt;
&lt;p&gt;For any single feature, sure, attaching a boolean to it is simple and not too confusing.&lt;/p&gt;
&lt;p&gt;But what happens when you have 100 different features, all with their associated boolean?&lt;/p&gt;
&lt;p&gt;That gives more possible feature permutations than a 32 bit integer can evaluate without overflowing :-)&lt;/p&gt;
&lt;p&gt;I think the resulting minefield is a poor developer experience. When you can't do anything without checking caps first, that makes it hard to write clear, maintainable code! And it's even harder to properly test code that contains so many conditional branches and optional execution paths.&lt;/p&gt;
&lt;p&gt;In practice, I've never seen anyone properly check all of the possible DX9 caps. Most developers choose one of these simplification strategies:&lt;/p&gt;
&lt;p&gt;- Some people just code for whatever happens to work on their development PC, and are surprised when the resulting game doesn't run on other hardware.&lt;/p&gt;
&lt;p&gt;- Some people code for the lowest common denominator hardware, carefully avoiding any optional features. Trouble is, pretty much everything in DX9 is technically optional!&lt;/p&gt;
&lt;p&gt;- Some people pick just two or three &amp;quot;feature levels&amp;quot; that their game will adjust to: the fancy version with all the special effects, the more limited version where they disable some of the fancier stuff, plus maybe a super stripped down version where they just render basic textured objects with no effects at all. They check caps at startup to decide which of these codepaths best fits the current hardware, then just use the selected rendering logic. This way they have just a handful of codepaths to maintain and test, as opposed to billions of possible overlapping permutations.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971582" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971349</link><pubDate>Tue, 02 Mar 2010 07:51:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971349</guid><dc:creator>Morten</dc:creator><description>&lt;p&gt;Are you seriously implying that anyone cares about avatars on Xbox? :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971349" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971342</link><pubDate>Tue, 02 Mar 2010 07:27:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971342</guid><dc:creator>Clayton Hughes</dc:creator><description>&lt;p&gt;And here I was rooting for cap bits for being the least surprising.&lt;/p&gt;
&lt;p&gt;While they certainly require more work on the client programmer's end--they ought to query anything they want to do, and come up with an alternative (or let the user know why they're failing--e.g. they're on 1995 hardware) if it's not supported. &amp;nbsp;You could even throw an exception if they call something unsupported.&lt;/p&gt;
&lt;p&gt;At some point, you'll have to rely on the programmer to do a little bit of thinking on their own.&lt;/p&gt;
&lt;p&gt;Cap bits don't really become a surprise if it's the standard procedure for most of the API.&lt;/p&gt;
&lt;p&gt;I can see where they would fail, though: &amp;nbsp;In the worst case, cap bits could be essentially useless--if they're going to have to roll their own Audio system because they're doing cross-3-platform audio, then it might be easier to just ditch XACT entirely and use the same custom code on all three devices.&lt;/p&gt;
&lt;p&gt;On the other hand, cap bits make the most sense in an environment like the GPU department where you can ask things like &amp;quot;do you support x in hardware?&amp;quot; and if so taking that path, otherwise doing it in code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971342" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971205</link><pubDate>Tue, 02 Mar 2010 00:38:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971205</guid><dc:creator>Iarus</dc:creator><description>&lt;p&gt;One thing to note is that &amp;quot;Game for Windows&amp;quot; and &amp;quot;Game for Windows LIVE&amp;quot; are not just a brand name that takes lots of place on the cover of your game's box.&lt;/p&gt;
&lt;p&gt;They are APIs, a good run of QA testing and more importantly TCRs (A TCR (Technical Certification Requirement) is a test case that must pass before software can be certified as compliant to a given standard).&lt;/p&gt;
&lt;p&gt;In XNA they are only good practices, with the GRWL stamp you MUST implement some things in a specific way if you ever want your game being released.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971205" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971178</link><pubDate>Mon, 01 Mar 2010 23:33:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971178</guid><dc:creator>Matthew</dc:creator><description>&lt;p&gt;How does your verdict fit with an example like TextureAddressMode.Border?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971178" width="1" height="1"&gt;</description></item><item><title>re: Some platforms are more equal than others</title><link>http://blogs.msdn.com/b/shawnhar/archive/2010/03/01/some-platforms-are-more-equal-than-others.aspx#9971175</link><pubDate>Mon, 01 Mar 2010 23:24:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9971175</guid><dc:creator>JoelBennett</dc:creator><description>&lt;p&gt;Erzengel: I'm guessing probably a fair bit of politics behind something like that. &amp;nbsp;Just think about this: if the whole Live platform was free to &amp;nbsp;develop for and run on, what would prevent developers from making games and sucking the Live bandwidth dry, while Microsoft foots the bill for everything? &amp;nbsp;At least with Xbox Live, Gold members pay a fee to use the service, which I imagine is used to maintain all the servers that everything is running on. &amp;nbsp;That, and what would prevent people from reverse engineering the Live components, especially if they have access to the API, more information, and the distributable DLLs? &amp;nbsp;I'm guessing cheating would definitely become a bigger issue for Live enabled PC games.&lt;/p&gt;
&lt;p&gt;That's just a guess, but that could be part of it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9971175" width="1" height="1"&gt;</description></item></channel></rss>