Jump to content

  • Log In with Google      Sign In   
  • Create Account

Pure device question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 15 January 2013 - 07:01 AM

Hi all,

DirectX documentation says that GetRenderState() and some other functions don't work when device is created as pure. It also says that pure device doesn't filter redundant states. But it seems that all GetRendersState functions work correctly when I create device as pure. I don't get any errors in debbug output when using these functions on pure device. Also I get warnings of dx ignoring setting redundant states. Why is this so? I use ATI Radeon HD 5770.

Thanks!

Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 5062

Like
2Likes
Like

Posted 15 January 2013 - 08:14 PM

It is fairly common for a set of illegal API calls to actually be supported by the D3D9 drivers - even if you aren't technically supposed to be able to do some things, it is often allowed by the driver anyway.  You could try creating a reference device and see if you get the same behavior.  The ref device is typically the 'law' when it comes to ensuring that your program is running correctly.



#3 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 16 January 2013 - 06:12 AM

It works on reference device too. So what does this mean? Is it driver specific and I can't count on it to work on other drivers? I don't use these illegal functions anyway, I just wanted to know.

Edited by SIIYA, 16 January 2013 - 06:19 AM.


#4 Hodgman   Moderators   -  Reputation: 30378

Like
0Likes
Like

Posted 16 January 2013 - 06:29 AM

The docs say it's not supposed to work, so I wouldn't rely on it (make a non-pure device if you need this functionality).

 

Out of curiosity, does it work only because you've set D3D9 to debug mode in the Direct3D control panel? Or does it work even when you set it back to regular mode?



#5 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 16 January 2013 - 06:58 AM

It works in regular mode also...I was curious about why I'm getting D3D9 warnings in debbug mode about ignoring setting redundant states when using pure device. And then I saw that these illigal functions also worked so I thought maybe pure device functionality was obsolete on new drivers. But like I said, i don't really use any of these functions...just wanted to see difference in performance between pure and non-pure device and as far as I can see there isn't one (in my case instancing helps a lot).

Edited by SIIYA, 16 January 2013 - 06:58 AM.


#6 Adam_42   Crossbones+   -  Reputation: 2505

Like
0Likes
Like

Posted 16 January 2013 - 05:41 PM

It's possible something else has hooked the device creation and not passed through the pure flag. Obvious candidates are programs like FRAPS, and Steam which draw on top of the rendered image.



#7 Tom KQT   Members   -  Reputation: 1588

Like
0Likes
Like

Posted 17 January 2013 - 02:04 AM

It works in regular mode also...I was curious about why I'm getting D3D9 warnings in debbug mode about ignoring setting redundant states when using pure device. And then I saw that these illigal functions also worked so I thought maybe pure device functionality was obsolete on new drivers. But like I said, i don't really use any of these functions...just wanted to see difference in performance between pure and non-pure device and as far as I can see there isn't one (in my case instancing helps a lot).

Those warnings about redundant states can be related to the debug runtimes, maybe with debug runtimes redundant states are checked even for pure device. And as you don't get any debug output in the release version, you won't be able to see whether it does the checking with release pure device or not :)

 

And the second part - are the GetXxxx just working in the meaning that they are not giving you warnings or errors, or are they really actually returning valid data? Did you verify this thoroughly? What I mean is that maybe the functions are returning wrong values (random / cached / default / whatever).



#8 mhagain   Crossbones+   -  Reputation: 7965

Like
1Likes
Like

Posted 17 January 2013 - 04:40 AM

Is this on a Vista/7/8 machine?  On these a pure device may be disabled - see: http://msdn.microsoft.com/en-us/library/windows/hardware/ff539634%28v=vs.85%29.aspx

 

When the fixed-function vertex or pixel shader converter is used, the pure device is disabled. When an application requests the pure device, the Direct3D runtime creates a HAL device.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#9 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 17 January 2013 - 06:44 AM

<blockquote class="ipsBlockquote" data-author="mhagain" data-cid="5022477"><p>&nbsp;<br />Is this on a Vista/7/8 machine?&nbsp; On these a pure device <em>may</em> be disabled - see: <a data-cke-saved-href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff539634(v=vs.85).aspx" href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff539634(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/hardware/ff539634(v=vs.85).aspx</a><br /><br /></p><blockquote class="ipsBlockquote"><p>When the fixed-function vertex or pixel shader converter is used, the pure device is disabled. When an application requests the pure device, the Direct3D runtime creates a HAL device.</p></blockquote>&nbsp;<br /><p><br /></p></blockquote><br /><br />This is it. Thank you very much for this link, I didn't know this.<br /><br />And thank you all guys<br />

#10 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 17 January 2013 - 06:47 AM

Is this on a Vista/7/8 machine? On these a pure device may be disabled - see: <a data-cke-saved-href="" href="" "="">http://msdn.microsof...4(v=vs.85).aspx

Quote
When the fixed-function vertex or pixel shader converter is used, the pure device is disabled. When an application requests the pure device, the Direct3D runtime creates a HAL device.
 
This is it. Thank you very much for this link, I didn't know this.

And thank you all guys

#11 SIIYA   Members   -  Reputation: 469

Like
0Likes
Like

Posted 17 January 2013 - 06:51 AM

Damn, what's wrong with quotes smile.png




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS