Original Post
[color="#1C2837"]I can't seem to get my MS buffer to resolve, the result simply looks like a non-ms render. Here's what I'm doing
-Create Swapchain with no MSAA
-Create RenderTarget with MSAA, and RTView with D3D10_RTV_DIMENSION_TEXTURE2DMS
-Create DepthTarget with MSAA, and DSView with D3D10_DSV_DIMENSION_TEXTURE2DMS
-Bind RenderTargetView and DepthStencilView
-Render Scene
[color="#1C2837"]-Call ResolveSubresource() to resolve RenderTarget resource into Swapchain resource.
[color="#1C2837"]-Call swapchain->Present()
[color="#1C2837"]I dont seem to be getting any errors in the console, and im not sure how I can use PIX to help me out in this scenario, although loading it in PIX does acknowledge that MSAA is being used as I get the option to disable it for pixel history data. Any ideas what I'm doing wrong?
[color="#1c2837"]Samples = 4
[color="#1c2837"]RenderTarget Format = DXGI_FORMAT_R8G8B8A8_UNORM
[color="#1c2837"]DepthTarget Format = DXGI_FORMAT_D32_FLOAT
[color="#1C2837"]RenderTarget
[color="#1c2837"]
[color="#1c2837"]DepthTarget
[color="#1c2837"]
-Create Swapchain with no MSAA
-Create RenderTarget with MSAA, and RTView with D3D10_RTV_DIMENSION_TEXTURE2DMS
-Create DepthTarget with MSAA, and DSView with D3D10_DSV_DIMENSION_TEXTURE2DMS
-Bind RenderTargetView and DepthStencilView
-Render Scene
[color="#1C2837"]-Call ResolveSubresource() to resolve RenderTarget resource into Swapchain resource.
[color="#1C2837"]-Call swapchain->Present()
[color="#1C2837"]I dont seem to be getting any errors in the console, and im not sure how I can use PIX to help me out in this scenario, although loading it in PIX does acknowledge that MSAA is being used as I get the option to disable it for pixel history data. Any ideas what I'm doing wrong?
[color="#1c2837"]Samples = 4
[color="#1c2837"]RenderTarget Format = DXGI_FORMAT_R8G8B8A8_UNORM
[color="#1c2837"]DepthTarget Format = DXGI_FORMAT_D32_FLOAT
[color="#1C2837"]RenderTarget
[color="#1c2837"]
D3D10_TEXTURE2D_DESC t2dd;
t2dd.Width = Width;
t2dd.Height = Height;
t2dd.MipLevels = 1;
t2dd.ArraySize = 1;
t2dd.Format = m_Format;
t2dd.SampleDesc.Count = m_Samples;
t2dd.SampleDesc.Quality = 0;
t2dd.Usage = D3D10_USAGE_DEFAULT;
t2dd.BindFlags = D3D10_BIND_RENDER_TARGET | D3D10_BIND_SHADER_RESOURCE;
t2dd.CPUAccessFlags = 0;
t2dd.MiscFlags = ( m_GenerateMipMaps ? D3D10_RESOURCE_MISC_GENERATE_MIPS : 0 );
m_pD3DDevice->CreateTexture2D( &t2dd, 0, &m_pResource );
D3D10_RENDER_TARGET_VIEW_DESC rtvd;
rtvd.Format = m_Format;
if( m_Samples > 1 )
{
rtvd.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2DMS;
}
else
{
rtvd.ViewDimension = D3D10_RTV_DIMENSION_TEXTURE2D;
rtvd.Texture2D.MipSlice = 0;
}
m_pD3DDevice->CreateRenderTargetView( m_pResource, &rtvd, &m_pRTView );
D3D10_SHADER_RESOURCE_VIEW_DESC srvd;
srvd.Format = m_Format;
if( m_Samples > 1 )
{
srvd.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2DMS;
}
else
{
srvd.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D;
srvd.Texture2D.MostDetailedMip = 0;
srvd.Texture2D.MipLevels = t2dd.MipLevels;
}
m_pD3DDevice->CreateShaderResourceView( m_pResource, &srvd, &m_pSRView );
[color="#1c2837"]DepthTarget
[color="#1c2837"]
D3D10_TEXTURE2D_DESC t2dd;
t2dd.Width = Width;
t2dd.Height = Height;
t2dd.MipLevels = 1;
t2dd.ArraySize = 1;
t2dd.Format = DXGI_FORMAT_R32_TYPELESS;
t2dd.SampleDesc.Count = m_Samples;
t2dd.SampleDesc.Quality = 0;
t2dd.Usage = D3D10_USAGE_DEFAULT;
t2dd.BindFlags = D3D10_BIND_DEPTH_STENCIL /*| D3D10_BIND_SHADER_RESOURCE*/;
t2dd.CPUAccessFlags = 0;
t2dd.MiscFlags = 0;
m_pD3DDevice->CreateTexture2D( &t2dd, 0, &m_pResource );
D3D10_DEPTH_STENCIL_VIEW_DESC dsvd;
dsvd.Format = DXGI_FORMAT_D32_FLOAT;
if( m_Samples > 1 )
{
dsvd.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2DMS;
dsvd.Texture2D.MipSlice = 0;
}
else
{
dsvd.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D;
dsvd.Texture2D.MipSlice = 0;
}
m_pD3DDevice->CreateDepthStencilView( m_pResource, &dsvd, &m_pDSView );