1
0
mirror of https://github.com/dege-diosg/dgVoodoo2 synced 2024-07-08 20:51:02 +02:00

Update to v2.79

This commit is contained in:
Dege 2022-06-16 14:42:29 +02:00
parent 8ee0f219dc
commit ffda187459
9 changed files with 54 additions and 42 deletions

Binary file not shown.

View File

@ -57,8 +57,8 @@ struct APIDebugObj
{ {
return infoLevel; return infoLevel;
} }
WarningLevel inline GetWarningLevel () const WarningLevel inline GetWarningLevel () const
{ {
return warningLevel; return warningLevel;
@ -70,7 +70,7 @@ struct APIDebugObj
return errorLevel; return errorLevel;
} }
UInt32 inline GetMaxTraceLevel () const UInt32 inline GetMaxTraceLevel () const
{ {
return maxTraceLevel; return maxTraceLevel;
@ -88,7 +88,7 @@ struct APIDebugObj
pOutputStream = _pOutputStream; pOutputStream = _pOutputStream;
} }
APIDebugObj (InfoLevel _infoLevel, WarningLevel _warningLevel, ErrorLevel _errorLevel, APIDebugObj (InfoLevel _infoLevel, WarningLevel _warningLevel, ErrorLevel _errorLevel,
const char* _pPrefixString, UInt32 _maxTraceLevel, IAPIDataStream* _pOutputStream = NULL): const char* _pPrefixString, UInt32 _maxTraceLevel, IAPIDataStream* _pOutputStream = NULL):
infoLevel (_infoLevel), infoLevel (_infoLevel),

View File

@ -5,7 +5,7 @@
// //
// Contact person: DG // Contact person: DG
// //
// ***************************************************************************** // *****************************************************************************
#ifndef APIOBJECT_HPP #ifndef APIOBJECT_HPP
#define APIOBJECT_HPP #define APIOBJECT_HPP

View File

@ -21,7 +21,7 @@ namespace dgVoodoo {
class IAPIDataStream class IAPIDataStream
{ {
public: public:
enum Origin enum Origin
{ {
OSet = 0, OSet = 0,

View File

@ -194,27 +194,38 @@ struct ConfigGeneralExt
}; };
UInt32 desktopResWidth; enum PresentationModel
UInt32 desktopResHeight; {
UInt32 desktopRefRateNumerator; PM_Automatic = 0,
UInt32 desktopRefRateDenominator; PM_Discard,
UInt32 desktopBitDepth; PM_Sequential,
UInt32 deframerSize; PM_FlipDiscard,
UInt32 imageXScaleFactor; PM_FlipSequential
UInt32 imageYScaleFactor; };
UInt32 cursorScaleFactor;
UInt32 displayROIPosX;
UInt32 displayROIPosY; UInt32 desktopResWidth;
UInt32 displayROISizeX; UInt32 desktopResHeight;
UInt32 displayROISizeY; UInt32 desktopRefRateNumerator;
Environment environment; UInt32 desktopRefRateDenominator;
UInt32 windowedAttributes; UInt32 desktopBitDepth;
UInt32 fullscreenAttributes; UInt32 deframerSize;
Resampling resampling; UInt32 imageXScaleFactor;
UInt32 fpsLimitNumerator; UInt32 imageYScaleFactor;
UInt32 fpsLimitDenominator; UInt32 cursorScaleFactor;
bool freeMouse; UInt32 displayROIPosX;
bool enableGDIHooking; UInt32 displayROIPosY;
UInt32 displayROISizeX;
UInt32 displayROISizeY;
Environment environment;
UInt32 windowedAttributes;
UInt32 fullscreenAttributes;
Resampling resampling;
PresentationModel presentationModel;
UInt32 fpsLimitNumerator;
UInt32 fpsLimitDenominator;
bool freeMouse;
bool enableGDIHooking;
ConfigGeneralExt (): ConfigGeneralExt ():
desktopResWidth (0), desktopResWidth (0),
@ -234,6 +245,7 @@ struct ConfigGeneralExt
windowedAttributes (WA_DefaultAttributes), windowedAttributes (WA_DefaultAttributes),
fullscreenAttributes (FSA_DefaultAttributes), fullscreenAttributes (FSA_DefaultAttributes),
resampling (RS_Bilinear), resampling (RS_Bilinear),
presentationModel (PM_Automatic),
fpsLimitNumerator (0), fpsLimitNumerator (0),
fpsLimitDenominator (0), fpsLimitDenominator (0),
freeMouse (false), freeMouse (false),
@ -524,12 +536,12 @@ struct ConfigDirectXExt
UInt32 enumeratedResolutionBitDepths; UInt32 enumeratedResolutionBitDepths;
UInt32 maxVSConstRegisters; UInt32 maxVSConstRegisters;
UInt32 nPatchTesselationLevel; UInt32 nPatchTesselationLevel;
UInt32 renderingOutputEnablingMask;
bool msD3DDeviceNames; bool msD3DDeviceNames;
bool rtTexturesForceScaleAndMSAA; bool rtTexturesForceScaleAndMSAA;
bool smoothedDepthSampling; bool smoothedDepthSampling;
bool deferredScreenModeSwitch; bool deferredScreenModeSwitch;
bool primarySurfaceBatchedUpdate; bool primarySurfaceBatchedUpdate;
bool enableSpecializedShaders;
ConfigDirectXExt () : ConfigDirectXExt () :
adapterIDType (AIDT_Default), adapterIDType (AIDT_Default),
@ -546,12 +558,12 @@ struct ConfigDirectXExt
enumeratedResolutionBitDepths (ERBD_All), enumeratedResolutionBitDepths (ERBD_All),
maxVSConstRegisters (256), maxVSConstRegisters (256),
nPatchTesselationLevel (0), nPatchTesselationLevel (0),
renderingOutputEnablingMask (0xFFFFFFFF),
msD3DDeviceNames (false), msD3DDeviceNames (false),
rtTexturesForceScaleAndMSAA (true), rtTexturesForceScaleAndMSAA (true),
smoothedDepthSampling (true), smoothedDepthSampling (true),
deferredScreenModeSwitch (false), deferredScreenModeSwitch (false),
primarySurfaceBatchedUpdate (false), primarySurfaceBatchedUpdate (false)
enableSpecializedShaders (true)
{ {
memset (extraResolutions, 0, sizeof (extraResolutions)); memset (extraResolutions, 0, sizeof (extraResolutions));
} }

Binary file not shown.

View File

@ -81,8 +81,8 @@ static void ConfigFromCustomINIStream (IMainFactory* pFactory)
status = (currentPos >= 0 && currentPos < (Int32) strlen (pStreamData)) ? StatusOk : StatusError; status = (currentPos >= 0 && currentPos < (Int32) strlen (pStreamData)) ? StatusOk : StatusError;
return status; return status;
} }
virtual Status Read (UInt32 count, void* buffer, UInt32* readBytes = NULL) const virtual Status Read (UInt32 count, void* buffer, UInt32* readBytes = NULL) const
{ {
if (status == IAPIDataStream::StatusOk) { if (status == IAPIDataStream::StatusOk) {
@ -98,8 +98,8 @@ static void ConfigFromCustomINIStream (IMainFactory* pFactory)
} }
return status; return status;
} }
virtual Status Write (UInt32 /*count*/, void* /*buffer*/, UInt32* /*writtenBytes*/) const virtual Status Write (UInt32 /*count*/, void* /*buffer*/, UInt32* /*writtenBytes*/) const
{ {
// no need to implement // no need to implement
@ -124,7 +124,7 @@ static void ConfigFromCustomINIStream (IMainFactory* pFactory)
IConfig* pConfig = pFactory->GetIConfig (); IConfig* pConfig = pFactory->GetIConfig ();
if (pConfig != NULL) { if (pConfig != NULL) {
// --- Test for a right configuration // --- Test for a right configuration
{ {
const char* pStreamData = "version = 0x255\n"\ const char* pStreamData = "version = 0x255\n"\
@ -169,15 +169,15 @@ static void ConfigFromCustomINIStream (IMainFactory* pFactory)
// no need to implement // no need to implement
return StatusError; return StatusError;
} }
virtual Status Read (UInt32 count, void* buffer, UInt32* readBytes = NULL) const virtual Status Read (UInt32 count, void* buffer, UInt32* readBytes = NULL) const
{ {
// no need to implement // no need to implement
return StatusError; return StatusError;
} }
virtual Status Write (UInt32 count, void* buffer, UInt32* writtenBytes) const virtual Status Write (UInt32 count, void* buffer, UInt32* writtenBytes) const
{ {
// Ok, it's a lame solution here, serves only demonstrating purposes // Ok, it's a lame solution here, serves only demonstrating purposes
@ -231,7 +231,7 @@ static void INIPropertySetRead (IMainFactory* pFactory)
if (pParser->Parse ("TestFiles\\INIPropertySet.ini", IIniParser::LowerCase)) { if (pParser->Parse ("TestFiles\\INIPropertySet.ini", IIniParser::LowerCase)) {
printf ("INIPropertySet.ini is successfully parsed. Dumping its content:\n\n"); printf ("INIPropertySet.ini is successfully parsed. Dumping its content:\n\n");
// Dump the property set to the console window // Dump the property set to the console window
for (UInt32 i = 0; i < pParser->GetNumberOfSections (); i++) { for (UInt32 i = 0; i < pParser->GetNumberOfSections (); i++) {
const char* pSectionName = pParser->GetSectionName (i); const char* pSectionName = pParser->GetSectionName (i);
@ -286,7 +286,7 @@ static void DumpGraphicsSystemInformation (IMainFactory* pFactory)
pCPLDDI->GetAdapterName (i, adapterName); pCPLDDI->GetAdapterName (i, adapterName);
printf ("\nAdapter %i: %ls", i, adapterName); printf ("\nAdapter %i: %ls", i, adapterName);
UInt32 numOutputs = pCPLDDI->GetNumberOfOutputs (i); UInt32 numOutputs = pCPLDDI->GetNumberOfOutputs (i);
printf ("\n Number of outputs: %d\n", numOutputs); printf ("\n Number of outputs: %d\n", numOutputs);
for (UInt32 j = 0; j < numOutputs; j++) { for (UInt32 j = 0; j < numOutputs; j++) {
@ -322,7 +322,7 @@ int main()
ConfigReadWrite (pFactory); ConfigReadWrite (pFactory);
ConfigFromCustomINIStream (pFactory); ConfigFromCustomINIStream (pFactory);
INIPropertySetRead (pFactory); INIPropertySetRead (pFactory);
DumpGraphicsSystemInformation (pFactory); DumpGraphicsSystemInformation (pFactory);
dgVoodoo_API_Exit (); dgVoodoo_API_Exit ();
} }