Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler(转)

当DX Use Debug Version of Direct3D 9 时,发出警告:Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler

原因见:http://www.devmaster.net/forums/showthread.php?t=13711

 

 

这是引起上述警告的确切原因。

Setting an effect's technique will cause all the corresponding states to be set. For samplers, this means the SetSamperState function will be called. But frequently a technique will have some states which are identical to the previous ones. The D3D debug runtime informs you of this, but it's really not an error. It might have been a minor performance issue with CPUs and drivers from years ago, but nowadays I'm pretty sure it's handled very efficiently.
 
I'm not aware of any other way to get rid of these warnings, so I assume that anyone who uses effect files is seeing these warnings when the debug output is set to the highest level. It's just very very verbose and I don't think sliding the setting back one notch has any downside worth paying attention to.
 
译:设置effect's technique将会引起所有的对应状态也被设置一次,例如:这也意味着SetSamperState函数也会被调用一次。但需要注意的地方是,通常情况下technique会拥有和之前一样的状态。在D3D中调试运行的时候会通知你这些(关于警告),但这些并不是一个错误。......(略)
 
我没有任何其它办法来摆脱这些警告,所以我认为:在把调式输出设为最高警告级别的时候,任何人在使用效果文件的时候,都会出现这些警告。......(略)

你可能感兴趣的:(function,performance,output,Direct3D,Warnings)