Fix UWP build

This commit is contained in:
Wojtek Figat
2022-09-06 19:35:11 +02:00
parent 450eedda02
commit 73d0fc4973
3 changed files with 8 additions and 11 deletions

View File

@@ -277,7 +277,9 @@ bool GPUDeviceDX11::Init()
&& GetModuleHandleA("renderdoc.dll") == nullptr // Disable tearing with RenderDoc (prevents crashing)
#endif
)
AllowTearing = true;
{
_allowTearing = true;
}
}
// Get flags and device type base on current configuration

View File

@@ -20,7 +20,6 @@ class GPUDeviceDX11 : public GPUDeviceDX
{
friend GPUContextDX11;
friend GPUSwapChainDX11;
private:
// Private Stuff
@@ -29,6 +28,7 @@ private:
IDXGIFactory* _factoryDXGI;
GPUContextDX11* _mainContext;
bool _allowTearing = false;
// Static Samplers
ID3D11SamplerState* _samplerLinearClamp;
@@ -45,15 +45,10 @@ private:
ID3D11DepthStencilState* DepthStencilStates[9 * 2 * 2]; // Index = ComparisonFunc[0-8] + DepthTestEnable[0?9] + DepthWriteEnable[0?18]
public:
static GPUDevice* Create();
GPUDeviceDX11(IDXGIFactory* dxgiFactory, GPUAdapterDX* adapter);
~GPUDeviceDX11();
public:
bool AllowTearing = false;
public:
// Gets DX11 device
@@ -79,8 +74,6 @@ public:
return _mainContext;
}
public:
ID3D11BlendState* GetBlendState(const BlendingMode& blending);
public:

View File

@@ -16,9 +16,11 @@ GPUSwapChainDX11::GPUSwapChainDX11(GPUDeviceDX11* device, Window* window)
, _windowHandle(static_cast<IUnknown*>(window->GetNativePtr()))
#endif
, _swapChain(nullptr)
, _backBuffer(nullptr)
#if PLATFORM_WINDOWS
, _allowTearing(false)
, _isFullscreen(false)
#endif
, _backBuffer(nullptr)
{
ASSERT(_windowHandle);
_window = window;
@@ -162,7 +164,7 @@ bool GPUSwapChainDX11::Resize(int32 width, int32 height)
_device->WaitForGPU();
GPUDeviceLock lock(_device);
#if PLATFORM_WINDOWS
_allowTearing = _device->AllowTearing;
_allowTearing = _device->_allowTearing;
#endif
_format = GPU_BACK_BUFFER_PIXEL_FORMAT;