How to check if D3DDEVTYPE_HAL is available (with reply address)

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Arie » Fri, 23 Aug 2002 23:06:48



Hello all,

Excuses, my reply address was invalid

I am on my first steps on ActiveX8 programming.
(Windows-95 using VB6).

When doing a CreateDevice Call with the D3DEVTYPE_HAL
I get an err.nr=-2005530516.
When using D3DEVTYPE_REF all goes fine.

When running DXDIAG.EXE tho following is displayed:

DirectDraw Acceleration :    Enabled
Direct3D Acceleration :        Enabled
AGP texture Acceleration :   Enabled

Furthermore I see significant speed difference between 'software-'
and 'hardware accelerated rendering' when performing the 'Direct3D'
test.

The DXCapsViewer also seems to display two 'DirectDrawDevices'
- Primary Display Driver (display)
- Hardware Emulation Layer.

I am struggling for 2 days with this problem, and I am lost.

Does anybody have an idea what might be wrong ?

Thanks in advance,

Arie Voors.

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Mikae » Sat, 24 Aug 2002 07:27:01


Hi!

Quote:>When doing a CreateDevice Call with the D3DEVTYPE_HAL
>I get an err.nr=-2005530516.
>When using D3DEVTYPE_REF all goes fine.

Well... This HRESULT is an 'D3DERR_INVALIDCALL'
equivalent. Just try to use some functions
(D3DXGetErrorString for instance), to decode D3D return
values or organize your code in a way to display messages
on your own (construction "if
returnvalue=D3DERR_INVALIDCALL then DisplayMessage ...")

If you didn't do wrong anything else (parameters of
CreateDevice valid?) D3DERR_INVALIDCALL means "HAL Device?
No way - no support" :)

Personally, before creating device i perform a quick-check
of devices: IDirect3D8::GetDeviceCaps for DEVTYPE_HAL and
DEVTYPE_REF. If GetDeviceCaps for _HAL fails, i assume
that there's no HW rendering support and create REF
Devices. If both invokes go fine, i have device caps for
further use... Noone told me it's the best way of
detection, but (personally) that's the way i've choosen...

Regards, Mikael

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Rich [Microsoft Direct3D MV » Sat, 24 Aug 2002 10:16:13


[Please do not mail me a copy of your followup]



Quote:>Personally, before creating device i perform a quick-check
>of devices: IDirect3D8::GetDeviceCaps for DEVTYPE_HAL and
>DEVTYPE_REF. If GetDeviceCaps for _HAL fails, i assume
>that there's no HW rendering support and create REF
>Devices.

The REF device will only be there if the SDK is installed.  Otherwise
you'll get the "NULL reference device" and nothing will happen when
you attempt to do things.

Direct3D8 doesn't support the idea of a SW device.  So if there's no
HAL device, there's no device period.

If you need a SW device, you need to use an earlier version of
Direct3D that supports software devices.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
  Direct3D Book <http://www.xmission.com/~legalize/book/>
    izfree: Open source tools for Windows Installer
            <http://izfree.sourceforge.net>

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Mikae » Sun, 25 Aug 2002 05:22:26


Quote:>The REF device will only be there if the SDK is installed.

So... As i understood - i should always rely on HAL?

Even if a user runs my apps on a really "oldie", i should
create HAL, and - eventually - expect less features
supported? And the only exception should be - a card, that
doesn't support any HW rasterization at all (in such case
HAL creation will fail and REF too)?

Regards, Mikael

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Rich [Microsoft Direct3D MV » Sun, 25 Aug 2002 06:25:13


[Please do not mail me a copy of your followup]



Quote:>>The REF device will only be there if the SDK is installed.

>So... As i understood - i should always rely on HAL?

Yep.  If you need to run on cards with no HW rasterizer, then you
should use an older version of Direct3D.  Direct3D8 is intended for
"now and beyond" not "now and before".

Quote:>Even if a user runs my apps on a really "oldie", i should
>create HAL, and - eventually - expect less features
>supported? And the only exception should be - a card, that
>doesn't support any HW rasterization at all (in such case
>HAL creation will fail and REF too)?

Right.  Direct3D8 is for modern hardware.  If you need to support
really old hardware, you should use an older version of the Direct3D
interface like Direct3D7 perhaps.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
  Direct3D Book <http://www.xmission.com/~legalize/book/>
    izfree: Open source tools for Windows Installer
            <http://izfree.sourceforge.net>
 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Mikae » Mon, 26 Aug 2002 05:28:26


Just imagine... I've been working on DX7 some time and on
DX8 till it's release time... But - after almost a year -
your answer cleared this question to me :)

Thanks for precious information...

Regards, Mikael

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Arie » Tue, 27 Aug 2002 21:01:29


Are you sure about this...?

Overhere I have two systems, and old w-95 system
and a newer -me system. Both without an SDK, but
on both the REF device is, when is available and
working.

Arie.

(p.s. the HAL device now works fine, after downloading
a newer (but obscure) driver...)


>Just imagine... I've been working on DX7 some time and on
>DX8 till it's release time... But - after almost a year -
>your answer cleared this question to me :)

>Thanks for precious information...

>Regards, Mikael

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Rich [Microsoft Direct3D MV » Wed, 28 Aug 2002 00:14:00


[Please do not mail me a copy of your followup]



Quote:>Are you sure about this...?

Yes.

Quote:>Overhere I have two systems, and old w-95 system
>and a newer -me system. Both without an SDK, but
>on both the REF device is, when is available and
>working.

Is it the 8.1 REF device?  You won't get it without installing the
SDK.  8.1 non-SDK systems will give you a "null REF" device, which
does nothing at all, despite being able to instantiate it.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
  Direct3D Book <http://www.xmission.com/~legalize/book/>
    izfree: Open source tools for Windows Installer
            <http://izfree.sourceforge.net>
 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Arie » Wed, 28 Aug 2002 17:59:45


Sorry, but I got very curious about this issue.

On both system's I am able to to change
the D3DDEVICE_HAL to D3DDEVICE_REF.
The performance is dramaticcaly reduced, but
it still works, so I thought the REF device is now
doing the work  and is available for use.

On the W-95 system I 'upgraded' from DX7 to
DX8 (8.0)., so maybe the REF device is still
left form the DX7 installation.

The -ME system is still in his original  configuration
with DirectX 8.0 installed and without a SDK.
Also on this sytem I am able to switch between _HAL
and _REF.

Besides that on both systems, the DXDIAG tool enables
me to disable hardware acceleration. Why is this possible
when no _HAL is available ?

Arie.


>[Please do not mail me a copy of your followup]



>>Are you sure about this...?

>Yes.

>>Overhere I have two systems, and old w-95 system
>>and a newer -me system. Both without an SDK, but
>>on both the REF device is, when is available and
>>working.

>Is it the 8.1 REF device?  You won't get it without installing the
>SDK.  8.1 non-SDK systems will give you a "null REF" device, which
>does nothing at all, despite being able to instantiate it.
>--
>Ask me about my upcoming book on Direct3D from Addison-Wesley!
>  Direct3D Book <http://www.xmission.com/~legalize/book/>
>    izfree: Open source tools for Windows Installer
>            <http://izfree.sourceforge.net>

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Rich [Microsoft Direct3D MV » Thu, 29 Aug 2002 01:00:12


[Please do not mail me a copy of your followup]



Quote:>On both system's I am able to to change
>the D3DDEVICE_HAL to D3DDEVICE_REF.

With what version of the interfaces?
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
  Direct3D Book <http://www.xmission.com/~legalize/book/>
    izfree: Open source tools for Windows Installer
            <http://izfree.sourceforge.net>
 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Hsiang-Tai Chie » Thu, 29 Aug 2002 16:48:29



> Sorry, but I got very curious about this issue.

> On both system's I am able to to change
> the D3DDEVICE_HAL to D3DDEVICE_REF.
> The performance is dramaticcaly reduced, but
> it still works, so I thought the REF device is now
> doing the work  and is available for use.

> On the W-95 system I 'upgraded' from DX7 to
> DX8 (8.0)., so maybe the REF device is still
> left form the DX7 installation.

> The -ME system is still in his original  configuration
> with DirectX 8.0 installed and without a SDK.
> Also on this sytem I am able to switch between _HAL
> and _REF.

> Besides that on both systems, the DXDIAG tool enables
> me to disable hardware acceleration. Why is this possible
> when no _HAL is available ?

> Arie.

Have you installed DX8 SDK over these 2 systems and then remove the SDK? If
you do so, there will be a file named D3DREF8.DLL existed in your Windows
system folder, and that's why you can switch device type from D3DDEVICE_HAL
to D3DDEVICE_REF and get an workable REF device....

Please, search the D3DREF8.DLL in your Windows system folder, I think it's
the reason why you can get workable REF renderer. Without this file, REF
device should be NULL REF device and it's not workable....

But be aware, Microsoft does not allow you to distribute this D3DREF8.DLL
file to user (according to DX8.1 SDK document). So in an Windows system
without DX8SDK installed, NULL REF device (which is not workable) should be
normal....

Regards,
Hsiang-Tai Chien

 
 
 

How to check if D3DDEVTYPE_HAL is available (with reply address)

Post by Arie » Thu, 29 Aug 2002 19:02:48


Hello,

The D3DREF8.DLL is available. Maybe it was installed
together with MSDN library or the VB6 package ?

I am sure I did not yet install and/or remove any SDK.

I think I 'stole' enough of your time, so it's not
strictly required to follow-up on this message.

The version data:

Operating System: Microsoft Windows 95 (4.0, Build 1212)  B
Language: English (Regional Setting: Dutch)
Processor: Intel Pentium III, ~600MHz
Memory: 128MB RAM
Page File: 111MB used, 1809MB available
DirectX Version: DirectX 8.0 (4.08.00.0400)
DX Setup Parameters: /PackageInstall
DxDiag Version: 4.08.00.0400

Arie.


>[Please do not mail me a copy of your followup]



>>On both system's I am able to to change
>>the D3DDEVICE_HAL to D3DDEVICE_REF.

>With what version of the interfaces?
>--
>Ask me about my upcoming book on Direct3D from Addison-Wesley!
>  Direct3D Book <http://www.xmission.com/~legalize/book/>
>    izfree: Open source tools for Windows Installer
>            <http://izfree.sourceforge.net>

 
 
 

1. Mail reply problems (UUCP paths and return addresses)

Recently, I've read interesting articles or have received several pieces
of interesting mail.  Unfortunately, the return paths has been bad ones.
I've corresponded with other people (most recently Peter Neumann at
SRI) about this problem.  It only appears to be getting worse.  I feel
very bad about if someone sends me mail, and I can't get an answer to them.
For all of us: please figure out a return path or address if on the
Internet (in particular) and put it at the end of articles or mail
like a signature.

From the Rock of Ages Home for Retired Hackers:


  "You trust the `reply' command with all those different mailers out there?"
  "Send mail, avoid follow-ups.  If enough, I'll summarize."
  {uunet,hplabs,hao,ihnp4,decwrl,allegra,tektronix}!ames!aurora!eugene

2. FS: Amiga/Video Toaster 4000 - Loaded!

3. same message as above, correct reply address

4. gouraud-phong-shading

5. point/line checks - Reply to Patrick Steele

6. new website

7. NEW FONTS AVAILABLE, GIVE ME YOUR POSTAL ADDRESS

8. CSG

9. Computer arts was available last time I checked

10. Check VRAM available

11. Help, Ram Available Check Problem