Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
Update to v2.83
Browse files Browse the repository at this point in the history
  • Loading branch information
dege-diosg committed Aug 7, 2024
1 parent b09faa6 commit e7d8eb7
Show file tree
Hide file tree
Showing 27 changed files with 82 additions and 18 deletions.
Binary file modified dgVoodooAPI/Bin/x64/Release/dgVoodooAPI.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Bin/x64/Spec Release/dgVoodooAPI.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Bin/x86/Release/dgVoodooAPI.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Bin/x86/Spec Release/dgVoodooAPI.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Doc/dgVoodooAPI.chm
Binary file not shown.
46 changes: 39 additions & 7 deletions dgVoodooAPI/Inc/Addon/ID3D12Root.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ class ID3D12ResourceDescRingBuffer
virtual void Release () = 0;
};

// --- ID3D12Buffer ------------------------------------------------------------

class ID3D12Buffer
// --- ID3D12LockableResource --------------------------------------------------

class ID3D12LockableResource
{
public:
enum LockType
Expand All @@ -206,23 +207,53 @@ class ID3D12Buffer
LT_Discard // Discard - No wait for GPU (dynamic buffer)
};

virtual bool HasAddressChanged () const = 0;
virtual void ClearAddressChangedFlag () = 0;
virtual bool GetAndClearAddressChangedBit (UInt32 idx) = 0;

virtual void Release () = 0;
};


// --- ID3D12Buffer ------------------------------------------------------------

class ID3D12Buffer : public ID3D12LockableResource
{
public:
struct LockData
{
UInt64 gpuAddress;
void* ptr;
ID3D12Resource* pBuffer;
};

virtual bool HasAddressChanged () const = 0;
virtual void ClearAddressChangedFlag () = 0;
virtual bool GetAndClearAddressChangedBit (UInt32 idx) = 0;

public:
virtual LockData Lock (LockType lockType, ID3D12Fence* pFence = NULL, UInt64 fenceValue = 0) = 0;
virtual void Unlock () = 0;
};

virtual void Release () = 0;

// --- ID3D12DynamicTexture ----------------------------------------------------

class ID3D12DynamicTexture : public ID3D12LockableResource
{
public:
struct LockData
{
UInt64 gpuAddress;
void* ptr;
ID3D12Resource* pBuffer;
UInt32 rowPitch;
UInt32 depthPitch;
};

public:
virtual LockData Lock (LockType lockType, UInt32 faceIdx, UInt32 mipmapLevelIdx,
ID3D12Fence* pFence = NULL, UInt64 fenceValue = 0) = 0;
virtual void Unlock () = 0;
};


// --- ID3D12GraphicsCommandListAuto -------------------------------------------

class ID3D12GraphicsCommandListAuto
Expand Down Expand Up @@ -251,6 +282,7 @@ class ID3D12GraphicsCommandListAuto
bool forceAsync = false) = 0;
};


// --- Helpers -----------------------------------------------------------------

struct D3D12RSPARAMETER: public D3D12_ROOT_PARAMETER
Expand Down
9 changes: 9 additions & 0 deletions dgVoodooAPI/Inc/Addon/ID3D12RootObserver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

#include "ID3D12Root.hpp"

// --- Predeclarations ---------------------------------------------------------

struct DXGI_SWAP_CHAIN_DESC;
struct IDXGIFactory1;
struct IDXGIOutput;
struct IDXGISwapChain;

namespace dgVoodoo {

// --- ID3D12RootObserver ------------------------------------------------------
Expand Down Expand Up @@ -68,6 +75,8 @@ class ID3D12RootObserver
virtual bool D3D12BeginUsingAdapter (UInt32 adapterID) = 0;
virtual void D3D12EndUsingAdapter (UInt32 adapterID) = 0;

virtual bool D3D12CreateSwapchainHook (UInt32 adapterID, IDXGIFactory1* pDxgiFactory, IUnknown* pCommandQueue, const DXGI_SWAP_CHAIN_DESC& desc, IDXGISwapChain** ppSwapChain) = 0;

virtual void D3D12SwapchainCreated (UInt32 adapterID, ID3D12Swapchain* pSwapchain, const ID3D12Root::SwapchainData& swapchainData) = 0;
virtual void D3D12SwapchainChanged (UInt32 adapterID, ID3D12Swapchain* pSwapchain, const ID3D12Root::SwapchainData& swapchainData) = 0;
virtual void D3D12SwapchainReleased (UInt32 adapterID, ID3D12Swapchain* pSwapchain) = 0;
Expand Down
4 changes: 3 additions & 1 deletion dgVoodooAPI/Inc/dgVoodooConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ struct ConfigDirectXExt
bool deferredScreenModeSwitch;
bool primarySurfaceBatchedUpdate;
bool suppressAMDBlacklist;
bool d3d12BoundsChecking;

ConfigDirectXExt () :
adapterIDType (AIDT_Default),
Expand All @@ -612,7 +613,8 @@ struct ConfigDirectXExt
smoothedDepthSampling (true),
deferredScreenModeSwitch (false),
primarySurfaceBatchedUpdate (false),
suppressAMDBlacklist (false)
suppressAMDBlacklist (false),
d3d12BoundsChecking (false)
{
memset (extraResolutions, 0, sizeof (extraResolutions));
}
Expand Down
Binary file modified dgVoodooAPI/Lib/arm64/dgVoodooAPI.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/arm64/dgVoodooAddon.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/arm64ec/dgVoodooAddon.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/x64/dgVoodooAPI.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/x64/dgVoodooAddon.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/x86/dgVoodooAPI.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Lib/x86/dgVoodooAddon.lib
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/ARM64/Release/APILibrary.exe
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/ARM64/Release/SampleAddon.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/ARM64EC/Release/SampleAddon.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/Win32/Release/APILibrary.exe
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/Win32/Release/SampleAddon.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/x64/Release/APILibrary.exe
Binary file not shown.
Binary file modified dgVoodooAPI/Samples/Bin/x64/Release/SampleAddon.dll
Binary file not shown.
8 changes: 4 additions & 4 deletions dgVoodooAPI/Samples/D3D12 Addon/AddonMain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

// --- Includes ----------------------------------------------------------------

#include "..\Inc\IIniParser.hpp"
#include "..\Inc\APIDebugObj.hpp"
#include "IIniParser.hpp"
#include "APIDebugObj.hpp"

#include "..\Inc\Addon\AddonDefs.hpp"
#include "..\Inc\Addon\IAddonMainCallback.hpp"
#include "Addon\AddonDefs.hpp"
#include "Addon\IAddonMainCallback.hpp"

#include "Presenter.hpp"
#include "Texturer.hpp"
Expand Down
4 changes: 2 additions & 2 deletions dgVoodooAPI/Samples/D3D12 Addon/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <tchar.h>
#include <Windows.h>

#include "..\Inc\Addon\AddonDefs.hpp"
#include "..\Inc\Addon\IAddonMainCallback.hpp"
#include "Addon\AddonDefs.hpp"
#include "Addon\IAddonMainCallback.hpp"

// --- Defines -----------------------------------------------------------------

Expand Down
18 changes: 18 additions & 0 deletions dgVoodooAPI/Samples/D3D12 Addon/Presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,15 @@ bool Presenter::ILoadShaders ()
}


void Presenter::IReleaseShaders ()
{
pVSQuad->Release ();
pPSGlass->Release ();
pVSQuad = NULL;
pPSGlass = NULL;
}


bool Presenter::ICreateRootSignature (AdapterData& adapter)
{
// SRV array descriptor - just for demonstration purposes: SRV range[3..4] in space 1
Expand Down Expand Up @@ -431,6 +440,8 @@ void Presenter::D3D12RootReleased (const ID3D12Root* _pD3D12Root)

delete[] glassImage.pBitmap;
memset (&glassImage, 0, sizeof (glassImage));

IReleaseShaders ();

pD3D12Root = NULL;
}
Expand Down Expand Up @@ -503,6 +514,13 @@ void Presenter::D3D12EndUsingAdapter (UInt32 adapterID)
}


bool Presenter::D3D12CreateSwapchainHook (UInt32 /*adapterID*/, IDXGIFactory1* /*pDxgiFactory*/, IUnknown* /*pCommandQueue*/, const DXGI_SWAP_CHAIN_DESC& /*desc*/, IDXGISwapChain** /*ppSwapChain*/)
{
// We do not want to create a swapchain, leave it to dgVoodoo
return false;
}


void Presenter::D3D12SwapchainCreated (UInt32 adapterID, ID3D12Swapchain* pSwapchain, const ID3D12Root::SwapchainData& swapchainData)
{
// Just put it into our entries and don't do anything else
Expand Down
5 changes: 4 additions & 1 deletion dgVoodooAPI/Samples/D3D12 Addon/Presenter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// --- Includes ----------------------------------------------------------------

#include "..\Inc\Addon\ID3D12RootObserver.hpp"
#include "Addon\ID3D12RootObserver.hpp"
#include "ImageLoader.hpp"
#include <unordered_map>

Expand Down Expand Up @@ -101,6 +101,7 @@ class Presenter: public ID3D12RootObserver
bool IParsePresenterINISection ();

bool ILoadShaders ();
void IReleaseShaders ();
bool ICreateRootSignature (AdapterData& adapter);
void IReleaseRootSignature (AdapterData& adapter);
bool ICreateGlassTexture (AdapterData& adapter);
Expand All @@ -120,6 +121,8 @@ class Presenter: public ID3D12RootObserver
virtual bool D3D12BeginUsingAdapter (UInt32 adapterID) override;
virtual void D3D12EndUsingAdapter (UInt32 adapterID) override;

virtual bool D3D12CreateSwapchainHook (UInt32 adapterID, IDXGIFactory1* pDxgiFactory, IUnknown* pCommandQueue, const DXGI_SWAP_CHAIN_DESC& desc, IDXGISwapChain** ppSwapChain) override;

virtual void D3D12SwapchainCreated (UInt32 adapterID, ID3D12Swapchain* pSwapchain, const ID3D12Root::SwapchainData& swapchainData) override;
virtual void D3D12SwapchainChanged (UInt32 adapterID, ID3D12Swapchain* pSwapchain, const ID3D12Root::SwapchainData& swapchainData) override;
virtual void D3D12SwapchainReleased (UInt32 adapterID, ID3D12Swapchain* pSwapchain) override;
Expand Down
6 changes: 3 additions & 3 deletions dgVoodooAPI/Samples/D3D12 Addon/Texturer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

// --- Includes ----------------------------------------------------------------

#include "..\Inc\Addon\ID3DObserver.hpp"
#include "..\Inc\Addon\ID3DDeviceObserver.hpp"
#include "..\Inc\Addon\ID3DResourceObserver.hpp"
#include "Addon\ID3DObserver.hpp"
#include "Addon\ID3DDeviceObserver.hpp"
#include "Addon\ID3DResourceObserver.hpp"

// --- Namespaces --------------------------------------------------------------

Expand Down

0 comments on commit e7d8eb7

Please sign in to comment.