<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.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>Direct3D 10 </title><link>http://forums.xna.com/forums/29.aspx</link><description>Only questions about the Direct3D 10 API are permitted here.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Dimension Error</title><link>http://forums.xna.com/forums/thread/189301.aspx</link><pubDate>Fri, 12 Jun 2009 17:50:27 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:189301</guid><dc:creator>PhilTaylor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/189301.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=189301</wfw:commentRss><description>we need to see your rendering code where you set the texture up/bind it to slot 0 ( Effect-&amp;gt;SetResources, PSSetShaderResource, etc ), and the shader code to comment.</description></item><item><title>Dimension Error</title><link>http://forums.xna.com/forums/thread/189042.aspx</link><pubDate>Fri, 12 Jun 2009 03:12:57 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:189042</guid><dc:creator>u77k</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/189042.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=29&amp;PostID=189042</wfw:commentRss><description>&lt;br /&gt;
&lt;br /&gt;
&lt;address&gt;&lt;span style="color:#993399;"&gt; D3D10_TEXTURE2D_DESC depthStencilDesc;&lt;br /&gt;
 depthStencilDesc.Width     = mClientWidth;&lt;br /&gt;
 depthStencilDesc.Height    = mClientHeight;&lt;br /&gt;
 depthStencilDesc.MipLevels = 1;&lt;br /&gt;
 depthStencilDesc.ArraySize = 1;&lt;br /&gt;
 depthStencilDesc.Format    = DXGI_FORMAT_R32_TYPELESS;&lt;br /&gt;
 depthStencilDesc.SampleDesc.Count   = 1; // multisampling must match&lt;br /&gt;
 depthStencilDesc.SampleDesc.Quality = 0; // swap chain values.&lt;br /&gt;
 depthStencilDesc.Usage          = D3D10_USAGE_DEFAULT;&lt;br /&gt;
 depthStencilDesc.BindFlags      =  D3D10_BIND_DEPTH_STENCIL | D3D10_BIND_SHADER_RESOURCE;&lt;br /&gt;
 depthStencilDesc.CPUAccessFlags = 0; &lt;br /&gt;
 depthStencilDesc.MiscFlags      = 0;&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&lt;span style="color:#993399;"&gt; HR(md3dDevice-&amp;gt;CreateTexture2D(&amp;amp;depthStencilDesc, NULL, &amp;amp;mDepthStencilBuffer));&lt;/span&gt;&lt;/address&gt;
&lt;p&gt;&lt;span style="color:#993399;"&gt; // Create the depth stencil view&lt;br /&gt;
 D3D10_DEPTH_STENCIL_VIEW_DESC descDSV;&lt;br /&gt;
 //if( 1 == descDepth.SampleDesc.Count ) {&lt;br /&gt;
 descDSV.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D;&lt;br /&gt;
 descDSV.Format = DXGI_FORMAT_D32_FLOAT; // Make the view see this as D32_FLOAT instead of typeless&lt;br /&gt;
 descDSV.Texture2D.MipSlice = 0;&lt;br /&gt;
 HR(md3dDevice-&amp;gt;CreateDepthStencilView(mDepthStencilBuffer, &amp;amp;descDSV, &amp;amp;mDepthStencilView));&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;D3D10: ERROR: ID3D10Device::Draw: The view dimension declared in the shader code does not match the view type bound to slot 0 of the Pixel Shader unit. This is invalid if the shader actually uses the view (e.g. it is not skipped due to shader code branching). [ EXECUTION ERROR #354: DEVICE_DRAW_VIEW_DIMENSION_MISMATCH ]&lt;br /&gt;
&lt;span style="color:#993399;"&gt;&lt;br /&gt;
Actually I create a sprite. Whenever I draw the sprite, VStudio always show this message in output panel.&lt;br /&gt;
&lt;br /&gt;
Thanks for your help&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;</description></item></channel></rss>