Sign in to follow this  

MultiSampleType error

Recommended Posts

I am getting this error when running our game with debug drivers (works fine in release): Direct3D9: (ERROR) :MultiSampleType between DepthStencil Buffer and RenderTarget must match. First-chance exception at 0x7c81eb33 in bliss.exe: Microsoft C++ exception: long @ 0x0012f9f4. Direct3D9: (ERROR) :Clear failed. my setup code looks like:
d3dpp.BackBufferWidth = vid_mode.m_dwCreationWidth;
d3dpp.BackBufferHeight = vid_mode.m_dwCreationHeight;
d3dpp.BackBufferFormat = vid_mode.m_dwFormat;
d3dpp.BackBufferCount = vid_mode.m_dwBackBuffer_Count;
d3dpp.MultiSampleType = D3DMULTISAMPLE_4_SAMPLES;// D3DMULTISAMPLE_NONE;//D3DMULTISAMPLE_4_SAMPLES;//vid_mode.m_Adapters[adapter].devices[device].MultiSampleType;
d3dpp.SwapEffect = vid_mode.m_dwSwapEffect;
d3dpp.hDeviceWindow = winhwnd;
d3dpp.Windowed = vid_mode.m_Adapters[adapter].devices[device].bWindowed;
d3dpp.EnableAutoDepthStencil = FALSE;
d3dpp.Flags = vid_mode.m_dwFlags;
d3dpp.FullScreen_RefreshRateInHz = vid_mode.m_dw_CreationRefreshRate;
d3dpp.PresentationInterval = vid_mode.m_dwPresentationInterval;

RENDER_WinWidth = vid_mode.m_dwCreationWidth;
RENDER_WinHeight = vid_mode.m_dwCreationHeight;

if(FAILED(g_pD3D->CreateDevice(adapter,vid_mode.m_Adapters[adapter].devices[device].DeviceType,winhwnd,vid_mode.m_dwBehavior,&d3dpp,&g_pd3dDevice))) return E_FAIL;


and I immediately create what I think is a multisample type depth stencel:
			return E_FAIL;


Like I say - this works in release but fails in debug. Any ideas? I am using the April 2006 SDK on an ATI X800

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this