Jump to content
  • Advertisement
Sign in to follow this  

MultiSampleType error

This topic is 4574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

one of the other coders was creating a rendertarget and clearing it - using my multisampled depth buffer on a non multisampled RT.

Going away now to shower in bleach.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!