mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 05:52:11 +01:00
[d3d11] Moved render target state to OM state struct
This commit is contained in:
parent
f1ee761290
commit
7c1064e3eb
@ -831,13 +831,13 @@ namespace dxvk {
|
|||||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||||
ID3D11DepthStencilView* pDepthStencilView) {
|
ID3D11DepthStencilView* pDepthStencilView) {
|
||||||
// Update state vector for OMGetRenderTargets
|
// Update state vector for OMGetRenderTargets
|
||||||
for (UINT i = 0; i < m_state.omRenderTargetViews.size(); i++) {
|
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||||
D3D11RenderTargetView* view = nullptr;
|
D3D11RenderTargetView* view = nullptr;
|
||||||
|
|
||||||
if ((i < NumViews) && (ppRenderTargetViews[i] != nullptr))
|
if ((i < NumViews) && (ppRenderTargetViews[i] != nullptr))
|
||||||
view = static_cast<D3D11RenderTargetView*>(ppRenderTargetViews[i]);
|
view = static_cast<D3D11RenderTargetView*>(ppRenderTargetViews[i]);
|
||||||
|
|
||||||
m_state.omRenderTargetViews.at(i) = view;
|
m_state.om.renderTargetViews.at(i) = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO unbind overlapping shader resource views
|
// TODO unbind overlapping shader resource views
|
||||||
@ -847,9 +847,9 @@ namespace dxvk {
|
|||||||
// target bindings are updated. Set up the attachments.
|
// target bindings are updated. Set up the attachments.
|
||||||
DxvkRenderTargets attachments;
|
DxvkRenderTargets attachments;
|
||||||
|
|
||||||
for (UINT i = 0; i < m_state.omRenderTargetViews.size(); i++) {
|
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||||
if (m_state.omRenderTargetViews.at(i) != nullptr)
|
if (m_state.om.renderTargetViews.at(i) != nullptr)
|
||||||
attachments.setColorTarget(i, m_state.omRenderTargetViews.at(i)->GetDXVKImageView());
|
attachments.setColorTarget(i, m_state.om.renderTargetViews.at(i)->GetDXVKImageView());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO implement depth-stencil views
|
// TODO implement depth-stencil views
|
||||||
@ -896,8 +896,8 @@ namespace dxvk {
|
|||||||
ID3D11DepthStencilView** ppDepthStencilView) {
|
ID3D11DepthStencilView** ppDepthStencilView) {
|
||||||
if (ppRenderTargetViews != nullptr) {
|
if (ppRenderTargetViews != nullptr) {
|
||||||
for (UINT i = 0; i < NumViews; i++)
|
for (UINT i = 0; i < NumViews; i++)
|
||||||
ppRenderTargetViews[i] = i < m_state.omRenderTargetViews.size()
|
ppRenderTargetViews[i] = i < m_state.om.renderTargetViews.size()
|
||||||
? m_state.omRenderTargetViews.at(i).ref()
|
? m_state.om.renderTargetViews.at(i).ref()
|
||||||
: nullptr;
|
: nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,16 +8,18 @@
|
|||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
struct D3D11ContextStateOM {
|
struct D3D11ContextStateOM {
|
||||||
|
std::array<
|
||||||
|
Com<D3D11RenderTargetView>,
|
||||||
|
D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT> renderTargetViews;
|
||||||
|
|
||||||
Rc<DxvkFramebuffer> framebuffer;
|
Rc<DxvkFramebuffer> framebuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Context state
|
* \brief Context state
|
||||||
*/
|
*/
|
||||||
struct D3D11ContextState {
|
struct D3D11ContextState {
|
||||||
std::array<
|
|
||||||
Com<D3D11RenderTargetView>,
|
|
||||||
D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT> omRenderTargetViews;
|
|
||||||
D3D11ContextStateOM om;
|
D3D11ContextStateOM om;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user