1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Add interfaces to support D3D11 extensions

This commit is contained in:
Philip Rebohle 2019-04-24 18:57:15 +02:00
parent 8a3044a342
commit edbbdef787
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 101 additions and 3 deletions

View File

@ -1,7 +1,103 @@
#pragma once
#include "d3d11_include.h"
#include "../dxgi/dxgi_interfaces.h"
#include "../dxvk/dxvk_device.h"
#include "d3d11_include.h"
/**
* \brief D3D11 extension
*
* Lists D3D11 extensions supported by DXVK.
*/
enum D3D11_VK_EXTENSION : uint32_t {
D3D11_VK_EXT_MULTI_DRAW_INDIRECT = 0,
D3D11_VK_EXT_MULTI_DRAW_INDIRECT_COUNT = 1,
D3D11_VK_EXT_DEPTH_BOUNDS = 2,
D3D11_VK_EXT_BARRIER_CONTROL = 3,
};
/**
* \brief Barrier control flags
*/
enum D3D11_VK_BARRIER_CONTROL : uint32_t {
D3D11_VK_BARRIER_CONTROL_IGNORE_WRITE_AFTER_WRITE = 1 << 0,
};
/**
* \brief Extended D3D11 device
*
* Introduces a method to check for extension support.
*/
MIDL_INTERFACE("8a6e3c42-f74c-45b7-8265-a231b677ca17")
ID3D11VkExtDevice : public IUnknown {
static const GUID guid;
/**
* \brief Checks whether an extension is supported
*
* \param [in] Extension The extension to check
* \returns \c TRUE if the extension is supported
*/
virtual BOOL STDMETHODCALLTYPE GetExtensionSupport(
D3D11_VK_EXTENSION Extension) = 0;
};
/**
* \brief Extended D3D11 context
*
* Provides functionality for various D3D11
* extensions.
*/
MIDL_INTERFACE("fd0bca13-5cb6-4c3a-987e-4750de2ca791")
ID3D11VkExtContext : public IUnknown {
static const GUID guid;
virtual void STDMETHODCALLTYPE MultiDrawIndirect(
UINT DrawCount,
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) = 0;
virtual void STDMETHODCALLTYPE MultiDrawIndexedIndirect(
UINT DrawCount,
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) = 0;
virtual void STDMETHODCALLTYPE MultiDrawIndirectCount(
UINT MaxDrawCount,
ID3D11Buffer* pBufferForCount,
UINT ByteOffsetForCount,
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) = 0;
virtual void STDMETHODCALLTYPE MultiDrawIndexedIndirectCount(
UINT MaxDrawCount,
ID3D11Buffer* pBufferForCount,
UINT ByteOffsetForCount,
ID3D11Buffer* pBufferForArgs,
UINT ByteOffsetForArgs,
UINT ByteStrideForArgs) = 0;
virtual void STDMETHODCALLTYPE SetDepthBoundsTest(
BOOL Enable,
FLOAT MinDepthBounds,
FLOAT MaxDepthBounds) = 0;
virtual void STDMETHODCALLTYPE SetBarrierControl(
UINT ControlFlags) = 0;
};
#ifdef _MSC_VER
struct __declspec(uuid("8a6e3c42-f74c-45b7-8265-a231b677ca17")) ID3D11VkExtDevice;
struct __declspec(uuid("fd0bca13-5cb6-4c3a-987e-4750de2ca791")) ID3D11VkExtContext;
#else
DXVK_DEFINE_GUID(ID3D11VkExtDevice);
DXVK_DEFINE_GUID(ID3D11VkExtContext);
#endif

View File

@ -4,6 +4,8 @@
#include "../../dxgi/dxgi_interfaces.h"
const GUID ID3D11VkExtDevice::guid = {0x8a6e3c42,0xf74c,0x45b7,{0x82,0x65,0xa2,0x31,0xb6,0x77,0xca,0x17}};
const GUID ID3D11VkExtContext::guid = {0xfd0bca13,0x5cb6,0x4c3a,{0x98,0x7e,0x47,0x50,0xde,0x2c,0xa7,0x91}};
const GUID IDXGIVkAdapter::guid = {0x907bf281,0xea3c,0x43b4,{0xa8,0xe4,0x9f,0x23,0x11,0x07,0xb4,0xff}};
const GUID IDXGIVkMonitorInfo::guid = {0xc06a236f,0x5be3,0x448a,{0x89,0x43,0x89,0xc6,0x11,0xc0,0xc2,0xc1}};
const GUID IDXGIVkInteropDevice::guid = {0xe2ef5fa5,0xdc21,0x4af7,{0x90,0xc4,0xf6,0x7e,0xf6,0xa0,0x93,0x23}};