Shawn Hargreaves Blog
I must confess, I oversimplified when I labeled the yellow circle in this post as “Windows laptop”. Sure, the Reach profile in XNA Game Studio 4.0 does correspond to what features are widely available across different Windows machines (which makes it valuable even for Windows developers who do not care about other platforms), but this profile also matches the capabilities of Windows Phone 7 Series. The great thing (in fact the reason this whole profiles idea works) is that it turns out the abilities of the phone hardware closely match the baseline Windows feature set.
Things to know:
With no further ado, here is an overview of the two graphics profiles:
When I list the HiDef profile as requiring a DirectX 10 GPU on Windows, I don’t mean that XNA Game Studio 4.0 uses DirectX 10 or 11. It does not: our Windows framework is implemented using DirectX 9. But the HiDef profile requires a GPU with roughly Xbox 360 level capabilities: MRT, floating point surface formats, vertex texture fetch, etc. These are optional caps in DirectX 9, but we need them all to support HiDef (think of it as DirectX 9 turned up to 11). In theory it is possible that a DirectX 9 GPU could support all these caps, just like every DirectX 10 GPU exposes them all when we access it via the DirectX 9 API, but in practice I know of no such DirectX 9 chip. Rather than confusing everybody by saying “HiDef requires this complex set of caps”, it is easier to simplify this to just “HiDef requires a DirectX 10 GPU”. A nice benefit of accessing DirectX 10 hardware via the DirectX 9 API is this means HiDef games can run on Windows XP as well as Vista and Win7.
You will notice that rendertarget format support is still allowed to vary. There were just too many differences in format support for us to successfully standardize this. We have a caps API for querying what formats are available, but more importantly, we have a built-in fallback mechanism. The format parameters used when creating rendertargets and backbuffers have changed from “format” to “preferredFormat”. We will try to give you the exact format you asked for, but if that is not supported, we will automatically fall back to the closest possible match, looking for a format with similar bit depth, number of channels, etc. In most cases this means you can just write code and have it run across different devices without bothering to check caps. For instance if you make a phone game that asks for a Bgr5551 rendertarget, then run this on Xbox where 16 bit rendertargets are not supported, we will automatically switch to Color format instead.
These Game Studio 3.1 vertex element formats are no longer supported by any profile: Rg32, Rgba32, Rgba64, UInt101010, Normalized101010.
These Game Studio 3.1 texture formats are no longer supported by any profile: Dxt2, Dxt4, Bgr555, Bgr444, Bgra2338, Bgr233, Bgr24, Bgr32, Bgra1010102, Rgba32, Rgb32, NormalizedShort2, NormalizedShort4, Luminance8, Luminance16, LuminanceAlpha8, LuminanceAlpha16, Palette8, PaletteAlpha16, NormalizedLuminance16, NormalizedLuminance32, NormalizedAlpha1010102, NormalizedByte2Computed, VideoYuYv, Video UyVy, VideoGrGb, VideoRgBg, Multi2Bgra32.
Some of these formats were removed because they are not supported by enough hardware, or in some cases no hardware at all. Others were removed because they were redundant, as other formats provide the same functionality but with a slightly different bit layout. For instance we no longer have both RGB and BGR versions of the same formats.
Game Studio 4.0 changes the Color type from BGRA to RGBA byte ordering. Most games will never notice the change, as we not only updated the Color struct, but also changed our texture and vertex declaration creation code to match. If you have code that creates Color format textures directly, setting their contents from a byte array rather than a strongly typed Color, you will need to swap the order of your red and blue channels.
Those HiDef requirements seem a little wide in places. In particular texture/vertex formats. My 9800GT does not support a bunch of them(or recent drivers dont expose them).
eg the 10 10 10 2 texture format or the Short/NormalizedShort(not sure which) vertex format.
I guess ATI DX10 cards are a little more fully featured...
Use power of 2 textures or you will lose mip-mapping, wrapping textures, or any DXT compression.
Smaller draw batch sizes (16bit).
No floating point textures, No Multiple Render Targets, No Occlusion Queries.
No separate alpha blend (this will probably trip a lot of people up with their 'tile engines'.
Vastly trimmed down texture format list.
Re-arranged Color byte packing (this will trip up people who do SetData on setup, which seems like a lot).
So the existing caps API is still there?
Also, as the HiDef profile is 'Dx10-like', and not strictly Dx10 hardware, I cannot use HiDef and assume the hardware can do fp alpha blending on windows?
I suppose that Multisampling issupported only in HiDef, but it's not mentioned. Will it be supported also on Reach?
if all those feutures are not supported by the phone , well is not a Nvidia Tegra chip
inside the phone,,
please swict to the nvidia chip , or i think ie will fail,,you have a hard job here shawn
to make is all fid together
Multiple render targets: Up to 4 on HighDef. Isnt that going to give problems for using a lot of lightning with shadowmaps? Or well, I've had a lot of problems of reusing render targets (dont even know if it is supported), or is it now?
Shwarn what is the Chip Name and Generation on the Phone
> So the existing caps API is still there?
No. Only a very simplified new API for querying whether Reach or HiDef is supported, and what backbuffer formats are supported.
> Also, as the HiDef profile is 'Dx10-like', and not strictly Dx10 hardware, I cannot use HiDef and assume the hardware can do fp alpha blending on windows?
We're still working the exact details around FP blending support. I'd love to be able to provide this in a consistent way, but no promoses yet,
> I suppose that Multisampling issupported only in HiDef, but it's not mentioned. Will it be supported also on Reach?
Multisampling is in both profiles, but is part of the backbuffer format which is allowed to vary across platforms. The API is structured so that you ask for what level you would ideally like, but the runtime is allowed to give you back something different if the hardware doesn't support what you asked for.
> Multiple render targets: Up to 4 on HighDef. Isnt that going to give problems for using a lot of lightning with shadowmaps?
Sorry, I don't understand this question. You don't need multiple rendertargest to implement shadow maps. And also, you have multiple rendertargets in a HiDef game, just the same as you do with Game Studio 3.1.
> what is the Chip Name and Generation on the Phone
We're not discussing the hardware at that level of detail right now, sorry.
It looks like these graphics profiles only effect the caps. Is there any feature differences between the two profiles?
> It looks like these graphics profiles only effect the caps. Is there any feature differences between the two profiles?
I don't understand - what exactly is the difference between a cap and a feature?
I would count things like occlusion queries and multiple rendertargets as features.
I love that I can now get runtime errors on a low-end profile without having a low-end card available. This is incredibly useful.
Will GS 4.0 bring any improvements in the amount of memory (and subsequent address space fragmentation) used by content compilation?
So does this mean support for Shader Model 1.x has been dropped?