- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Im a developer and Id like to ask some things about Vertex processing and D3DCREATE_FPU_PRESERVE.
1) Vertex processing
As the X3000 is HW-TnL capable, and all older intel cards are not, couldn't the code shown at
http://software.intel.com/en-us/articles/intel-gma-3000-and-x3000-developers-guide
Intel GMA 3000 and X3000 Developer's Guide
looks like below ?
DWORD SetVertexProcessingMode( LPDIRECT3D9 pD3D )
{
// vertex processing mode - default is mixed for generic card
DWORD vertexprocessingmode = D3DCREATE_MIXED_VERTEXPROCESSING;
D3DCAPS9 caps; // Device CAPs structure
D3DADAPTER_IDENTIFIER9 adapterID; // Used to store device info
// Retrieve device capabilities
if( g_pD3D->GetDeviceCaps( 0, D3DDEVTYPE_HAL, &caps ) != D3D_OK ){
return E_FAIL; // exit if reading caps fails...
}
// Check if hardware T&L is supported...
// - The D3DDEVCAPS_HWTRANSFORMANDLIGHT capability should
// be enabled for GMA X3000
if ( ( caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT ) != 0 ){
vertexprocessingmode = D3DCREATE_HARDWARE_VERTEXPROCESSING;
}
else{
// Check vendor and device ID and enable software vertex
// processing for Intel Graphics...
// Gather the primary adapter's information...
if( g_pD3D->GetAdapterIdentifier(0,0,&adapterID ) != D3D_OK ){
return E_FAIL;
}
// this is an Intel non HW-TnL vcard
if ( (adapterID.VendorId == 0x8086 )) // Intel Architecture
{
vertexprocessingmode = D3DCREATE_SOFTWARE_VERTEXPROCESSING;
}
else
{
// Chipset does not meet minimum requirements...
return E_MINSPEC;
}
}
// return default mode - mixed
return vertexprocessingmode;
}
2) D3DCREATE_FPU_PRESERVE
Our application does intensive FPU operations, so our engine should use D3DCREATE_FPU_PRESERVE,
to avoid Direct D3D reduce fpu precision to single, when we need double precision.
Does it has bad i
mpact on 9x5 vcards ? what about X3000 ?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RE: 1
I think it would be safer to use the recommended approach described by the article. You don't gain anything by leaving out the checks against the device IDs, really...
RE: 2
You could use the D3DCREATE_FPU_PRESERVE flag, certainly; but just be aware that it is a minor performance penalty (on any graphics solution). The runtime is what sets/clears the FPU flags. I haven't measured the hit, but if you're considering using the flag (as opposed to setting the FPU mode yourself when you know you need it in a certain state) you should set it and see if there is any measurable performance impact to your app.
just my 2c anyway
I think it would be safer to use the recommended approach described by the article. You don't gain anything by leaving out the checks against the device IDs, really...
RE: 2
You could use the D3DCREATE_FPU_PRESERVE flag, certainly; but just be aware that it is a minor performance penalty (on any graphics solution). The runtime is what sets/clears the FPU flags. I haven't measured the hit, but if you're considering using the flag (as opposed to setting the FPU mode yourself when you know you need it in a certain state) you should set it and see if there is any measurable performance impact to your app.
just my 2c anyway
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page