Browse Source

Fix plPipeline under minGW.

Darryl Pogue 13 years ago
parent
commit
de2b7c3471
  1. 2
      Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp
  2. 8
      Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

2
Sources/Plasma/PubUtilLib/plPipeline/plDXDeviceRefs.cpp

@ -235,7 +235,7 @@ void plDXTextureRef::Release( void )
{ {
plProfile_DelMem(MemTexture, fDataSize + sizeof(plDXTextureRef)); plProfile_DelMem(MemTexture, fDataSize + sizeof(plDXTextureRef));
plProfile_Extern(ManagedMem); plProfile_Extern(ManagedMem);
PROFILE_POOL_MEM(D3DPOOL_MANAGED, fDataSize, false, (fOwner ? fOwner->GetKey() ? fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)")); PROFILE_POOL_MEM(D3DPOOL_MANAGED, fDataSize, false, (char*)(fOwner ? fOwner->GetKey() ? fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)"));
plDXPipeline::FreeManagedTexture(fDataSize); plDXPipeline::FreeManagedTexture(fDataSize);
fDataSize = 0; fDataSize = 0;

8
Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

@ -8309,7 +8309,7 @@ IDirect3DTexture9 *plDXPipeline::IMakeD3DTexture( plDXTextureRef *ref, D3DFORM
ref->fMaxWidth, ref->fMaxHeight, ref->fMMLvs, ref->GetFlags() ); ref->fMaxWidth, ref->fMaxHeight, ref->fMMLvs, ref->GetFlags() );
return nil; return nil;
} }
PROFILE_POOL_MEM(poolType, ref->fDataSize, true, (ref->fOwner ? ref->fOwner->GetKey() ? ref->fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)")); PROFILE_POOL_MEM(poolType, ref->fDataSize, true, (char*)(ref->fOwner ? ref->fOwner->GetKey() ? ref->fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)"));
fTexManaged += ref->fDataSize; fTexManaged += ref->fDataSize;
return texPtr; return texPtr;
@ -8362,7 +8362,7 @@ IDirect3DCubeTexture9 *plDXPipeline::IMakeD3DCubeTexture( plDXTextureRef *ref,
IDirect3DCubeTexture9 *texPtr = nil; IDirect3DCubeTexture9 *texPtr = nil;
fManagedAlloced = true; fManagedAlloced = true;
WEAK_ERROR_CHECK(fD3DDevice->CreateCubeTexture( ref->fMaxWidth, ref->fMMLvs, 0, formatType, poolType, &texPtr, NULL)); WEAK_ERROR_CHECK(fD3DDevice->CreateCubeTexture( ref->fMaxWidth, ref->fMMLvs, 0, formatType, poolType, &texPtr, NULL));
PROFILE_POOL_MEM(poolType, ref->fDataSize, true, (ref->fOwner ? ref->fOwner->GetKey() ? ref->fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)")); PROFILE_POOL_MEM(poolType, ref->fDataSize, true, (char*)(ref->fOwner ? ref->fOwner->GetKey() ? ref->fOwner->GetKey()->GetUoid().GetObjectName() : "(UnknownTexture)" : "(UnknownTexture)"));
fTexManaged += ref->fDataSize; fTexManaged += ref->fDataSize;
return texPtr; return texPtr;
} }
@ -11834,7 +11834,7 @@ void plDXPipeline::ISetErrorMessage( char *errStr )
// Convert the last D3D error code to a string (probably "Conflicting Render State"). // Convert the last D3D error code to a string (probably "Conflicting Render State").
void plDXPipeline::IGetD3DError() void plDXPipeline::IGetD3DError()
{ {
sprintf( fSettings.fErrorStr, "D3DError : %s", (char *)DXGetErrorString( fSettings.fDXError ) ); sprintf( fSettings.fErrorStr, "D3DError : %s", (char *)DXGetErrorString9( fSettings.fDXError ) );
} }
// IShowErrorMessage ///////////////////////////////////////////////////////////// // IShowErrorMessage /////////////////////////////////////////////////////////////
@ -12025,6 +12025,7 @@ const char *plDXPipeline::IGetDXFormatName( D3DFORMAT format )
// This is obsolete as of DX8 // This is obsolete as of DX8
void plDXPipeline::IFPUCheck() void plDXPipeline::IFPUCheck()
{ {
#ifdef _MSC_VER
WORD wSave, wTemp; WORD wSave, wTemp;
__asm fstcw wSave __asm fstcw wSave
if (wSave & 0x300 || // Not single mode if (wSave & 0x300 || // Not single mode
@ -12041,6 +12042,7 @@ void plDXPipeline::IFPUCheck()
fldcw wTemp fldcw wTemp
} }
} }
#endif
} }
// PushPiggyBackLayer ///////////////////////////////////////////////////// // PushPiggyBackLayer /////////////////////////////////////////////////////

Loading…
Cancel
Save