2017-10-11 09:51:48 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-20 22:17:14 +01:00
|
|
|
#include "../dxvk/dxvk_adapter.h"
|
2018-01-20 15:29:10 +01:00
|
|
|
#include "../dxvk/dxvk_cs.h"
|
2017-12-20 22:17:14 +01:00
|
|
|
#include "../dxvk/dxvk_device.h"
|
|
|
|
|
2018-06-11 14:29:47 +02:00
|
|
|
#include "d3d11_annotation.h"
|
2017-11-29 20:19:40 +01:00
|
|
|
#include "d3d11_context_state.h"
|
2017-10-11 09:51:48 +02:00
|
|
|
#include "d3d11_device_child.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
class D3D11Device;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext1> {
|
2017-10-11 09:51:48 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2017-10-11 15:32:24 +02:00
|
|
|
D3D11DeviceContext(
|
2018-04-28 14:17:52 +02:00
|
|
|
D3D11Device* pParent,
|
|
|
|
const Rc<DxvkDevice>& Device);
|
2017-10-11 09:51:48 +02:00
|
|
|
~D3D11DeviceContext();
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
2017-10-11 09:51:48 +02:00
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE DiscardResource(ID3D11Resource *pResource) final;
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE DiscardView(ID3D11View* pResourceView) final;
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE DiscardView1(
|
|
|
|
ID3D11View* pResourceView,
|
|
|
|
const D3D11_RECT* pRects,
|
|
|
|
UINT NumRects) final;
|
|
|
|
|
|
|
|
void STDMETHODCALLTYPE SwapDeviceContextState(
|
|
|
|
ID3DDeviceContextState* pState,
|
|
|
|
ID3DDeviceContextState** ppPreviousState) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GetDevice(ID3D11Device **ppDevice) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ClearState() final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE Begin(ID3D11Asynchronous *pAsync) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE End(ID3D11Asynchronous *pAsync) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE SetPredication(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Predicate* pPredicate,
|
2018-03-06 18:34:34 +01:00
|
|
|
BOOL PredicateValue) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GetPredication(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Predicate** ppPredicate,
|
2018-03-06 18:34:34 +01:00
|
|
|
BOOL* pPredicateValue) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CopySubresourceRegion(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pDstResource,
|
|
|
|
UINT DstSubresource,
|
|
|
|
UINT DstX,
|
|
|
|
UINT DstY,
|
|
|
|
UINT DstZ,
|
|
|
|
ID3D11Resource* pSrcResource,
|
|
|
|
UINT SrcSubresource,
|
2018-06-27 18:34:17 +02:00
|
|
|
const D3D11_BOX* pSrcBox);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE CopySubresourceRegion1(
|
|
|
|
ID3D11Resource* pDstResource,
|
|
|
|
UINT DstSubresource,
|
|
|
|
UINT DstX,
|
|
|
|
UINT DstY,
|
|
|
|
UINT DstZ,
|
|
|
|
ID3D11Resource* pSrcResource,
|
|
|
|
UINT SrcSubresource,
|
|
|
|
const D3D11_BOX* pSrcBox,
|
2018-06-27 18:34:17 +02:00
|
|
|
UINT CopyFlags);
|
2018-03-17 18:54:09 +01:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CopyResource(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pDstResource,
|
2018-06-27 18:34:17 +02:00
|
|
|
ID3D11Resource* pSrcResource);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CopyStructureCount(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Buffer* pDstBuffer,
|
|
|
|
UINT DstAlignedByteOffset,
|
|
|
|
ID3D11UnorderedAccessView* pSrcView) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ClearRenderTargetView(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11RenderTargetView* pRenderTargetView,
|
|
|
|
const FLOAT ColorRGBA[4]) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ClearUnorderedAccessViewUint(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
|
|
|
const UINT Values[4]) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
|
|
|
const FLOAT Values[4]) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ClearDepthStencilView(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11DepthStencilView* pDepthStencilView,
|
|
|
|
UINT ClearFlags,
|
|
|
|
FLOAT Depth,
|
|
|
|
UINT8 Stencil) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE ClearView(
|
|
|
|
ID3D11View *pView,
|
|
|
|
const FLOAT Color[4],
|
|
|
|
const D3D11_RECT *pRect,
|
|
|
|
UINT NumRects) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GenerateMips(
|
2018-06-27 18:34:17 +02:00
|
|
|
ID3D11ShaderResourceView* pShaderResourceView);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE UpdateSubresource(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pDstResource,
|
|
|
|
UINT DstSubresource,
|
|
|
|
const D3D11_BOX* pDstBox,
|
|
|
|
const void* pSrcData,
|
|
|
|
UINT SrcRowPitch,
|
2018-06-27 18:34:17 +02:00
|
|
|
UINT SrcDepthPitch);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE UpdateSubresource1(
|
|
|
|
ID3D11Resource* pDstResource,
|
|
|
|
UINT DstSubresource,
|
|
|
|
const D3D11_BOX* pDstBox,
|
|
|
|
const void* pSrcData,
|
|
|
|
UINT SrcRowPitch,
|
|
|
|
UINT SrcDepthPitch,
|
2018-06-27 18:34:17 +02:00
|
|
|
UINT CopyFlags);
|
2018-03-17 18:54:09 +01:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE SetResourceMinLOD(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pResource,
|
|
|
|
FLOAT MinLOD) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
FLOAT STDMETHODCALLTYPE GetResourceMinLOD(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pResource) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE ResolveSubresource(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Resource* pDstResource,
|
|
|
|
UINT DstSubresource,
|
|
|
|
ID3D11Resource* pSrcResource,
|
|
|
|
UINT SrcSubresource,
|
2018-06-27 18:34:17 +02:00
|
|
|
DXGI_FORMAT Format);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawAuto() final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE Draw(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT VertexCount,
|
|
|
|
UINT StartVertexLocation) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawIndexed(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT IndexCount,
|
|
|
|
UINT StartIndexLocation,
|
|
|
|
INT BaseVertexLocation) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawInstanced(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT VertexCountPerInstance,
|
|
|
|
UINT InstanceCount,
|
|
|
|
UINT StartVertexLocation,
|
|
|
|
UINT StartInstanceLocation) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawIndexedInstanced(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT IndexCountPerInstance,
|
|
|
|
UINT InstanceCount,
|
|
|
|
UINT StartIndexLocation,
|
|
|
|
INT BaseVertexLocation,
|
|
|
|
UINT StartInstanceLocation) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawIndexedInstancedIndirect(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Buffer* pBufferForArgs,
|
|
|
|
UINT AlignedByteOffsetForArgs) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DrawInstancedIndirect(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Buffer* pBufferForArgs,
|
|
|
|
UINT AlignedByteOffsetForArgs) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE Dispatch(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT ThreadGroupCountX,
|
|
|
|
UINT ThreadGroupCountY,
|
|
|
|
UINT ThreadGroupCountZ) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DispatchIndirect(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Buffer* pBufferForArgs,
|
|
|
|
UINT AlignedByteOffsetForArgs) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IASetInputLayout(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11InputLayout* pInputLayout) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IASetPrimitiveTopology(
|
2017-10-11 09:51:48 +02:00
|
|
|
D3D11_PRIMITIVE_TOPOLOGY Topology) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IASetVertexBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppVertexBuffers,
|
|
|
|
const UINT* pStrides,
|
|
|
|
const UINT* pOffsets) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IASetIndexBuffer(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11Buffer* pIndexBuffer,
|
|
|
|
DXGI_FORMAT Format,
|
|
|
|
UINT Offset) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IAGetInputLayout(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11InputLayout** ppInputLayout) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IAGetPrimitiveTopology(
|
2017-10-11 09:51:48 +02:00
|
|
|
D3D11_PRIMITIVE_TOPOLOGY* pTopology) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IAGetVertexBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppVertexBuffers,
|
|
|
|
UINT* pStrides,
|
|
|
|
UINT* pOffsets) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE IAGetIndexBuffer(
|
2018-01-23 19:10:48 +01:00
|
|
|
ID3D11Buffer** ppIndexBuffer,
|
|
|
|
DXGI_FORMAT* pFormat,
|
|
|
|
UINT* pOffset) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11VertexShader* pVertexShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
2018-03-17 18:54:09 +01:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE VSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11VertexShader** ppVertexShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
2018-03-17 18:54:09 +01:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE VSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE VSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11HullShader* pHullShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE HSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11HullShader** ppHullShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
2018-03-17 18:54:09 +01:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE HSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE HSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11DomainShader* pDomainShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
2018-03-17 18:54:09 +01:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE DSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11DomainShader** ppDomainShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE DSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE DSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11GeometryShader* pShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
virtual void STDMETHODCALLTYPE GSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11GeometryShader** ppGeometryShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE GSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE GSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11PixelShader* pPixelShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
2018-03-17 18:54:09 +01:00
|
|
|
|
|
|
|
void STDMETHODCALLTYPE PSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11PixelShader** ppPixelShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE PSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE PSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11ComputeShader* pComputeShader,
|
|
|
|
ID3D11ClassInstance* const* ppClassInstances,
|
|
|
|
UINT NumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSSetUnorderedAccessViews(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
|
|
|
const UINT* pUAVInitialCounts) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetShader(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11ComputeShader** ppComputeShader,
|
|
|
|
ID3D11ClassInstance** ppClassInstances,
|
|
|
|
UINT* pNumClassInstances) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetConstantBuffers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers) final;
|
|
|
|
|
2018-03-17 18:54:09 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetConstantBuffers1(
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetShaderResources(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetSamplers(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState** ppSamplers) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE CSGetUnorderedAccessViews(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView** ppUnorderedAccessViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMSetRenderTargets(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumViews,
|
|
|
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
2018-03-17 14:09:16 +01:00
|
|
|
ID3D11DepthStencilView* pDepthStencilView);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumRTVs,
|
|
|
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
|
|
|
ID3D11DepthStencilView* pDepthStencilView,
|
|
|
|
UINT UAVStartSlot,
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
2018-06-27 18:34:17 +02:00
|
|
|
const UINT* pUAVInitialCounts);
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMSetBlendState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11BlendState* pBlendState,
|
|
|
|
const FLOAT BlendFactor[4],
|
|
|
|
UINT SampleMask) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMSetDepthStencilState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11DepthStencilState* pDepthStencilState,
|
|
|
|
UINT StencilRef) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMGetRenderTargets(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumViews,
|
|
|
|
ID3D11RenderTargetView** ppRenderTargetViews,
|
|
|
|
ID3D11DepthStencilView** ppDepthStencilView) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumRTVs,
|
|
|
|
ID3D11RenderTargetView** ppRenderTargetViews,
|
|
|
|
ID3D11DepthStencilView** ppDepthStencilView,
|
|
|
|
UINT UAVStartSlot,
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView** ppUnorderedAccessViews) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMGetBlendState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11BlendState** ppBlendState,
|
|
|
|
FLOAT BlendFactor[4],
|
|
|
|
UINT* pSampleMask) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE OMGetDepthStencilState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11DepthStencilState** ppDepthStencilState,
|
|
|
|
UINT* pStencilRef) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSSetState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11RasterizerState* pRasterizerState) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSSetViewports(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumViewports,
|
|
|
|
const D3D11_VIEWPORT* pViewports) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSSetScissorRects(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumRects,
|
|
|
|
const D3D11_RECT* pRects) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSGetState(
|
2017-10-11 09:51:48 +02:00
|
|
|
ID3D11RasterizerState** ppRasterizerState) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSGetViewports(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT* pNumViewports,
|
|
|
|
D3D11_VIEWPORT* pViewports) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE RSGetScissorRects(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT* pNumRects,
|
|
|
|
D3D11_RECT* pRects) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE SOSetTargets(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer* const* ppSOTargets,
|
|
|
|
const UINT* pOffsets) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
void STDMETHODCALLTYPE SOGetTargets(
|
2017-10-11 09:51:48 +02:00
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppSOTargets) final;
|
|
|
|
|
2018-04-20 00:19:03 +02:00
|
|
|
void STDMETHODCALLTYPE TransitionSurfaceLayout(
|
|
|
|
IDXGIVkInteropSurface* pSurface,
|
|
|
|
const VkImageSubresourceRange* pSubresources,
|
|
|
|
VkImageLayout OldLayout,
|
|
|
|
VkImageLayout NewLayout);
|
|
|
|
|
2018-01-20 13:22:44 +01:00
|
|
|
protected:
|
2017-10-11 09:51:48 +02:00
|
|
|
|
2018-06-11 14:29:47 +02:00
|
|
|
D3D11Device* const m_parent;
|
|
|
|
D3D11UserDefinedAnnotation m_annotation;
|
2017-10-11 15:32:24 +02:00
|
|
|
|
2018-01-13 23:09:03 +01:00
|
|
|
Rc<DxvkDevice> m_device;
|
2018-01-20 22:52:18 +01:00
|
|
|
Rc<DxvkCsChunk> m_csChunk;
|
2018-01-23 16:43:55 +01:00
|
|
|
Rc<DxvkDataBuffer> m_updateBuffer;
|
2017-10-11 15:32:24 +02:00
|
|
|
|
2017-12-11 14:11:18 +01:00
|
|
|
Com<D3D11BlendState> m_defaultBlendState;
|
|
|
|
Com<D3D11DepthStencilState> m_defaultDepthStencilState;
|
|
|
|
Com<D3D11RasterizerState> m_defaultRasterizerState;
|
|
|
|
|
2018-01-13 23:09:03 +01:00
|
|
|
D3D11ContextState m_state;
|
2017-11-29 20:19:40 +01:00
|
|
|
|
2018-03-10 11:44:27 +01:00
|
|
|
void ApplyInputLayout();
|
|
|
|
|
|
|
|
void ApplyPrimitiveTopology();
|
|
|
|
|
2018-03-10 11:56:58 +01:00
|
|
|
void ApplyBlendState();
|
|
|
|
|
|
|
|
void ApplyBlendFactor();
|
|
|
|
|
|
|
|
void ApplyDepthStencilState();
|
|
|
|
|
|
|
|
void ApplyStencilRef();
|
|
|
|
|
|
|
|
void ApplyRasterizerState();
|
|
|
|
|
2018-03-10 11:44:27 +01:00
|
|
|
void ApplyViewportState();
|
|
|
|
|
2018-06-15 20:49:24 +02:00
|
|
|
void BindFramebuffer(
|
|
|
|
BOOL Spill);
|
2018-03-03 22:15:41 +01:00
|
|
|
|
2018-03-10 10:19:07 +01:00
|
|
|
template<typename T>
|
|
|
|
void BindShader(
|
2018-03-10 10:39:07 +01:00
|
|
|
T* pShader,
|
2018-03-10 10:19:07 +01:00
|
|
|
VkShaderStageFlagBits Stage) {
|
|
|
|
EmitCs([
|
2018-03-10 10:39:07 +01:00
|
|
|
cShader = pShader != nullptr ? pShader->GetShader() : nullptr,
|
2018-03-10 10:19:07 +01:00
|
|
|
cStage = Stage
|
|
|
|
] (DxvkContext* ctx) {
|
|
|
|
ctx->bindShader(cStage, cShader);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2018-03-10 10:39:07 +01:00
|
|
|
void BindVertexBuffer(
|
|
|
|
UINT Slot,
|
|
|
|
D3D11Buffer* pBuffer,
|
|
|
|
UINT Offset,
|
|
|
|
UINT Stride);
|
|
|
|
|
|
|
|
void BindIndexBuffer(
|
|
|
|
D3D11Buffer* pBuffer,
|
|
|
|
UINT Offset,
|
|
|
|
DXGI_FORMAT Format);
|
|
|
|
|
2018-03-10 11:16:52 +01:00
|
|
|
void BindConstantBuffer(
|
|
|
|
UINT Slot,
|
2018-03-18 12:36:45 +01:00
|
|
|
const D3D11ConstantBufferBinding* pBufferBinding);
|
2018-03-10 11:16:52 +01:00
|
|
|
|
|
|
|
void BindSampler(
|
|
|
|
UINT Slot,
|
|
|
|
D3D11SamplerState* pSampler);
|
|
|
|
|
|
|
|
void BindShaderResource(
|
|
|
|
UINT Slot,
|
|
|
|
D3D11ShaderResourceView* pResource);
|
|
|
|
|
|
|
|
void BindUnorderedAccessView(
|
|
|
|
UINT UavSlot,
|
|
|
|
UINT CtrSlot,
|
|
|
|
D3D11UnorderedAccessView* pUav);
|
|
|
|
|
|
|
|
void SetConstantBuffers(
|
2017-12-08 22:30:41 +01:00
|
|
|
DxbcProgramType ShaderStage,
|
2017-12-20 17:37:46 +01:00
|
|
|
D3D11ConstantBufferBindings& Bindings,
|
2017-12-08 19:39:33 +01:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
2018-03-18 12:36:45 +01:00
|
|
|
ID3D11Buffer* const* ppConstantBuffers,
|
|
|
|
const UINT* pFirstConstant,
|
|
|
|
const UINT* pNumConstants);
|
2017-12-08 19:39:33 +01:00
|
|
|
|
2018-03-10 11:16:52 +01:00
|
|
|
void SetSamplers(
|
2017-12-09 21:17:26 +01:00
|
|
|
DxbcProgramType ShaderStage,
|
2017-12-20 17:37:46 +01:00
|
|
|
D3D11SamplerBindings& Bindings,
|
2017-12-09 21:17:26 +01:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumSamplers,
|
|
|
|
ID3D11SamplerState* const* ppSamplers);
|
|
|
|
|
2018-03-10 11:16:52 +01:00
|
|
|
void SetShaderResources(
|
2017-12-10 01:56:07 +01:00
|
|
|
DxbcProgramType ShaderStage,
|
2017-12-20 17:37:46 +01:00
|
|
|
D3D11ShaderResourceBindings& Bindings,
|
2017-12-10 01:56:07 +01:00
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumResources,
|
|
|
|
ID3D11ShaderResourceView* const* ppResources);
|
|
|
|
|
2018-03-10 11:16:52 +01:00
|
|
|
void SetUnorderedAccessViews(
|
2017-12-28 19:05:53 +01:00
|
|
|
DxbcProgramType ShaderStage,
|
|
|
|
D3D11UnorderedAccessBindings& Bindings,
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews);
|
|
|
|
|
2018-06-15 20:49:24 +02:00
|
|
|
void SetRenderTargets(
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
|
|
|
ID3D11DepthStencilView* pDepthStencilView);
|
|
|
|
|
2018-01-11 12:23:55 +01:00
|
|
|
void InitUnorderedAccessViewCounters(
|
|
|
|
UINT NumUAVs,
|
|
|
|
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
|
|
|
const UINT* pUAVInitialCounts);
|
|
|
|
|
2018-03-18 12:45:27 +01:00
|
|
|
void GetConstantBuffers(
|
|
|
|
const D3D11ConstantBufferBindings& Bindings,
|
|
|
|
UINT StartSlot,
|
|
|
|
UINT NumBuffers,
|
|
|
|
ID3D11Buffer** ppConstantBuffers,
|
|
|
|
UINT* pFirstConstant,
|
|
|
|
UINT* pNumConstants);
|
|
|
|
|
2018-03-03 20:59:17 +01:00
|
|
|
void RestoreState();
|
|
|
|
|
2018-03-10 11:30:32 +01:00
|
|
|
void RestoreConstantBuffers(
|
|
|
|
DxbcProgramType Stage,
|
|
|
|
D3D11ConstantBufferBindings& Bindings);
|
|
|
|
|
|
|
|
void RestoreSamplers(
|
|
|
|
DxbcProgramType Stage,
|
|
|
|
D3D11SamplerBindings& Bindings);
|
|
|
|
|
|
|
|
void RestoreShaderResources(
|
|
|
|
DxbcProgramType Stage,
|
|
|
|
D3D11ShaderResourceBindings& Bindings);
|
|
|
|
|
|
|
|
void RestoreUnorderedAccessViews(
|
|
|
|
DxbcProgramType Stage,
|
2018-03-21 04:56:33 +01:00
|
|
|
D3D11UnorderedAccessBindings& Bindings);
|
2018-03-10 11:30:32 +01:00
|
|
|
|
2018-05-05 09:12:36 +02:00
|
|
|
bool ValidateRenderTargets(
|
|
|
|
UINT NumViews,
|
|
|
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
|
|
|
ID3D11DepthStencilView* pDepthStencilView);
|
|
|
|
|
2018-01-23 16:43:55 +01:00
|
|
|
DxvkDataSlice AllocUpdateBufferSlice(size_t Size);
|
|
|
|
|
2018-01-20 15:29:10 +01:00
|
|
|
template<typename Cmd>
|
|
|
|
void EmitCs(Cmd&& command) {
|
2018-01-20 22:52:18 +01:00
|
|
|
if (!m_csChunk->push(command)) {
|
2018-01-23 12:03:26 +01:00
|
|
|
EmitCsChunk(std::move(m_csChunk));
|
|
|
|
|
|
|
|
m_csChunk = new DxvkCsChunk();
|
2018-01-20 22:52:18 +01:00
|
|
|
m_csChunk->push(command);
|
|
|
|
}
|
2018-01-20 15:29:10 +01:00
|
|
|
}
|
|
|
|
|
2018-01-23 12:03:26 +01:00
|
|
|
void FlushCsChunk() {
|
|
|
|
if (m_csChunk->commandCount() != 0) {
|
|
|
|
EmitCsChunk(std::move(m_csChunk));
|
|
|
|
m_csChunk = new DxvkCsChunk();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void EmitCsChunk(Rc<DxvkCsChunk>&& chunk) = 0;
|
2018-01-20 22:52:18 +01:00
|
|
|
|
2017-10-11 09:51:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|