Sign in to follow this  
Asheh

Warnings/Errors from DX SetSamplerState

Recommended Posts

Asheh    354
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
MJP    19753
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
ET3D    810
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

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