Jump to content
  • Advertisement
Sign in to follow this  
Asheh

Warnings/Errors from DX SetSamplerState

This topic is 3484 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

Really unsure where this is coming from but:
First-chance exception at 0x76e1f328 in RTG Renderer.exe: Microsoft C++ exception: long at memory location 0x0051eca0..
Direct3D9: (ERROR) :SetSamplerState failed.
 
D3D9 Helper: IDirect3DDevice9::SetSamplerState failed: D3DERR_UNSUPPORTEDTEXTUREFILTER
Direct3D9: (ERROR) :Unsupported mag filter.
 
Direct3D9: (ERROR) :Invalid texture sampler state value. SetSamplerState failed.
 
First-chance exception at 0x76e1f328 in RTG Renderer.exe: Microsoft C++ exception: long at memory location 0x0051eca0..
Direct3D9: (ERROR) :SetSamplerState failed.
 
D3D9 Helper: IDirect3DDevice9::SetSamplerState failed: D3DERR_UNSUPPORTEDTEXTUREFILTER
Direct3D9: (ERROR) :Unsupported texture address mode.
 
Direct3D9: (ERROR) :Invalid texture sampler state value. SetSamplerState failed.
 
First-chance exception at 0x76e1f328 in RTG Renderer.exe: Microsoft C++ exception: long at memory location 0x0051eca0..
Direct3D9: (ERROR) :SetSamplerState failed.
 
D3D9 Helper: IDirect3DDevice9::SetSamplerState failed: E_FAIL
Direct3D9: (ERROR) :Unsupported texture address mode.
 
Direct3D9: (ERROR) :Invalid texture sampler state value. SetSamplerState failed.
 
First-chance exception at 0x76e1f328 in RTG Renderer.exe: Microsoft C++ exception: long at memory location 0x0051eca0..
Direct3D9: (ERROR) :SetSamplerState failed.

This happens when i load up my "standard" shader. Im assuming the sampler states are set internally?

//
//Standard sampler states
//
sampler TexDiffuseSamp = sampler_state
{
	Texture = <g_TexDiffuse>;
	MinFilter = ANISOTROPIC;
	MaxAnisotropy = 8;
	MagFilter = LINEAR;
	MipFilter = LINEAR;
	AddressU  = WRAP;
	AddressV  = WRAP;
};

sampler TexNormalMapSamp = sampler_state
{
	Texture = <g_TexNormalMap>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = LINEAR;
	AddressU  = WRAP;
	AddressV  = WRAP;
};

//shadow map samplers
sampler TexShadowMapSamp[2] = 
{
	sampler_state
	{
		Texture = <g_TexShadowMap0>;
		AddressU  = CLAMP;
		AddressV  = CLAMP;
	},
	sampler_state
	{
		Texture = <g_TexShadowMap1>;
		AddressU  = CLAMP;
		AddressV  = CLAMP;
	},
};
//
// PostProcess velocity samplers 
//

sampler CurFramePixelVelSampler = 
sampler_state
{
    Texture = <g_CurFrameVelocityTexture>;
    MinFilter = POINT;
    MagFilter = POINT;

    AddressU = CLAMP;
    AddressV = CLAMP;
};

sampler LastFramePixelVelSampler = 
sampler_state
{
    Texture = <g_LastFrameVelocityTexture>;
    MinFilter = POINT;
    MagFilter = POINT;

    AddressU = CLAMP;
    AddressV = CLAMP;
};

sampler RenderTargetSampler = 
sampler_state
{
    Texture = <g_RenderTargetTexture>;
    MinFilter = POINT;  
    MagFilter = POINT;

    AddressU = CLAMP;
    AddressV = CLAMP;
};



Share this post


Link to post
Share on other sites
Advertisement
Try running your app through PIX, and then capture a single frame. Then find where you call ID3DXEffect::BeginPass, and expand it to see all the calls to SetSamplerState. You should be able to view the HRESULT return codes to see which calls specifically are failing.

Share this post


Link to post
Share on other sites
The exceptions don't look to me like they are Direct3D errors, so may be something in your code. In that case they may be affecting further execution. Have you tried stepping through the code and seeing why they happen?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!