   Ignoring redundant SetSamplerState
  Hi,When I turn on dx debug and output level maxI found some messages in output window. "Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 13Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 14Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 25..."I understand "ignoring redundant setsamplerstate".But what I don't know is next this sentence."State:13, 14, 25, 15,16, 17, 18, 19, 20,...""D3DSAMPLERSTATETYPE" is defined and "D3DSAMP_DMAPOFFSET = 13"is the end as I know. is there more enum value in samplerstate?thanks.   
  This is the exact thing that I have been wondering.  In this utility I have been playing with, I tried to map those state numbers to the real enum, but those numbers...don't exist in the enumeration :P   ;  They reason for this is the way RefRast is implemented. As a Software device is use a similar interface as a real driver. As D3D drivers on XP need to be compatible to older runtimes the sampler states are a problem because they are not serrated from the texture stage states in earlier versions. To ease the driver development the D3D9 runtime maps the new Sampler states to the old texture stage stages before they are passed to the driver. Unfortunately the RefRast don't convert them back. But there is a list in the DDK#defineD3DTSS_ADDRESSU    ((D3DTEXTURESTAGESTATETYPE)13)#defineD3DTSS_ADDRESSV    ((D3DTEXTURESTAGESTATETYPE)14)#defineD3DTSS_BORDERCOLOR ((D3DTEXTURESTAGESTATETYPE)15)#defineD3DTSS_MAGFILTER   ((D3DTEXTURESTAGESTATETYPE)16)#defineD3DTSS_MINFILTER   ((D3DTEXTURESTAGESTATETYPE)17)#defineD3DTSS_MIPFILTER   ((D3DTEXTURESTAGESTATETYPE)18)#defineD3DTSS_MIPMAPLODBIAS    ((D3DTEXTURESTAGESTATETYPE)19)#defineD3DTSS_MAXMIPLEVEL ((D3DTEXTURESTAGESTATETYPE)20)#defineD3DTSS_MAXANISOTROPY    ((D3DTEXTURESTAGESTATETYPE)21)#defineD3DTSS_ADDRESSW    ((D3DTEXTURESTAGESTATETYPE)25)#defineD3DTSS_SRGBTEXTURE ((D3DTEXTURESTAGESTATETYPE)29)#defineD3DTSS_ELEMENTINDEX((D3DTEXTURESTAGESTATETYPE)30)#defineD3DTSS_DMAPOFFSET  ((D3DTEXTURESTAGESTATETYPE)31);  Thanks..But i'm still wondering why samplerstate warning appear.I didn't use SetSamplerState() at all.I just use Pixel shader and so simple as you see.===========================================sampler TextureSampler0 = sampler_state{    Texture = <tex0>;   };float4 PS( float2 Tex: TEXCOORD0 ) : COLOR{ return tex2D(TextureSampler0, Tex);}===========================================if I don't use texture in ps() there is no redundant sampler warning.I don't know why and I don't know how to fix it.;  Is this shader part of an effect?   ;Quote:Original post by DemirugThey reason for this is the way RefRast is implemented. As a Software device is use a similar interface as a real driver. As D3D drivers on XP need to be compatible to older runtimes the sampler states are a problem because they are not serrated from the texture stage states in earlier versions. To ease the driver development the D3D9 runtime maps the new Sampler states to the old texture stage stages before they are passed to the driver. Unfortunately the RefRast don't convert them back. But there is a list in the DDKAha - that would explain it!  Thanks [smile]   