graphics.PreferredBackBufferFormat = SurfaceFormat.Bgra1010102;
If I have the above line right after I create my GraphicsDeviceManager, anything I render to the screen comes out as total garbage in terms of color values *except* while one of the 360's panels (or whatever they're called - the ones the big X button brings up) is rendering. In that case everything renders fine.
Simple example, I render out a farily heavily tessellated quad who's verts range from -32 to +32 in world space (in both X and Z directions, Y = 0). My vertex shader passes abs( worldPos.xz ) into the pixel shader as a texture coordinate and the pixel shader returns float4( frac( texCoord ), 0, 1 ).
I expect this to give me a repeating pattern of squares that range from black in one corner to yellow in the opposite corner, mirrored about the X and Z axis. If I leave the surface format at it's default value, I get exactly that. If I set it to 1010102 then the it shades the right pixels but it fills them with the wrong values and I get pretty much random colors - though if I bring up a panel it renders as it should in the background.
I've tried setting a breakpoint on my DrawIndexedPrimitives call and comparing render states through the debugger but I just can't figure out what the difference is between the panel being up and it being hidden. I'm guessing the difference is hidden somewhere inside of wherever it is that XNA stuck Present (or whatever it's 360 equivalent is).
Do I need to create an explicit render target and resolve that to the backbuffer myself (which is what I suspect the crazy side panel drawing code does to the backbuffer) or am I just missing a flag somewhere