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中调试运行的时候会通知你这些(关于警告),但这些并不是一个错误。......(略)
 
我没有任何其它办法来摆脱这些警告,所以我认为:在把调式输出设为最高警告级别的时候,任何人在使用效果文件的时候,都会出现这些警告。......(略)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值