mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +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,
|
||||
ID3D11DepthStencilView* pDepthStencilView) {
|
||||
// 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;
|
||||
|
||||
if ((i < NumViews) && (ppRenderTargetViews[i] != nullptr))
|
||||
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
|
||||
@ -847,9 +847,9 @@ namespace dxvk {
|
||||
// target bindings are updated. Set up the attachments.
|
||||
DxvkRenderTargets attachments;
|
||||
|
||||
for (UINT i = 0; i < m_state.omRenderTargetViews.size(); i++) {
|
||||
if (m_state.omRenderTargetViews.at(i) != nullptr)
|
||||
attachments.setColorTarget(i, m_state.omRenderTargetViews.at(i)->GetDXVKImageView());
|
||||
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||
if (m_state.om.renderTargetViews.at(i) != nullptr)
|
||||
attachments.setColorTarget(i, m_state.om.renderTargetViews.at(i)->GetDXVKImageView());
|
||||
}
|
||||
|
||||
// TODO implement depth-stencil views
|
||||
@ -896,8 +896,8 @@ namespace dxvk {
|
||||
ID3D11DepthStencilView** ppDepthStencilView) {
|
||||
if (ppRenderTargetViews != nullptr) {
|
||||
for (UINT i = 0; i < NumViews; i++)
|
||||
ppRenderTargetViews[i] = i < m_state.omRenderTargetViews.size()
|
||||
? m_state.omRenderTargetViews.at(i).ref()
|
||||
ppRenderTargetViews[i] = i < m_state.om.renderTargetViews.size()
|
||||
? m_state.om.renderTargetViews.at(i).ref()
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
|
@ -8,16 +8,18 @@
|
||||
namespace dxvk {
|
||||
|
||||
struct D3D11ContextStateOM {
|
||||
std::array<
|
||||
Com<D3D11RenderTargetView>,
|
||||
D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT> renderTargetViews;
|
||||
|
||||
Rc<DxvkFramebuffer> framebuffer;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief Context state
|
||||
*/
|
||||
struct D3D11ContextState {
|
||||
std::array<
|
||||
Com<D3D11RenderTargetView>,
|
||||
D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT> omRenderTargetViews;
|
||||
D3D11ContextStateOM om;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user