mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Minor CPU savings
This commit is contained in:
parent
7e1b0ef8e6
commit
f76fd8fa5d
@ -3067,9 +3067,9 @@ namespace dxvk {
|
||||
// but the viewport coordinates are aligned to the top-left
|
||||
// corner so we can get away with flipping the viewport.
|
||||
for (uint32_t i = 0; i < m_state.rs.numViewports; i++) {
|
||||
const D3D11_VIEWPORT& vp = m_state.rs.viewports.at(i);
|
||||
const D3D11_VIEWPORT& vp = m_state.rs.viewports[i];
|
||||
|
||||
viewports.at(i) = VkViewport {
|
||||
viewports[i] = VkViewport {
|
||||
vp.TopLeftX, vp.Height + vp.TopLeftY,
|
||||
vp.Width, -vp.Height,
|
||||
vp.MinDepth, vp.MaxDepth,
|
||||
@ -3089,7 +3089,7 @@ namespace dxvk {
|
||||
|
||||
for (uint32_t i = 0; i < m_state.rs.numViewports; i++) {
|
||||
if (enableScissorTest && (i < m_state.rs.numScissors)) {
|
||||
D3D11_RECT sr = m_state.rs.scissors.at(i);
|
||||
D3D11_RECT sr = m_state.rs.scissors[i];
|
||||
|
||||
VkOffset2D srPosA;
|
||||
srPosA.x = std::max<int32_t>(0, sr.left);
|
||||
@ -3103,9 +3103,9 @@ namespace dxvk {
|
||||
srSize.width = uint32_t(srPosB.x - srPosA.x);
|
||||
srSize.height = uint32_t(srPosB.y - srPosA.y);
|
||||
|
||||
scissors.at(i) = VkRect2D { srPosA, srSize };
|
||||
scissors[i] = VkRect2D { srPosA, srSize };
|
||||
} else {
|
||||
scissors.at(i) = VkRect2D {
|
||||
scissors[i] = VkRect2D {
|
||||
VkOffset2D { 0, 0 },
|
||||
VkExtent2D {
|
||||
D3D11_VIEWPORT_BOUNDS_MAX,
|
||||
@ -3172,10 +3172,10 @@ namespace dxvk {
|
||||
// so we'll just create a new one every time the render
|
||||
// target bindings are updated. Set up the attachments.
|
||||
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||
if (m_state.om.renderTargetViews.at(i) != nullptr) {
|
||||
if (m_state.om.renderTargetViews[i] != nullptr) {
|
||||
attachments.color[i] = {
|
||||
m_state.om.renderTargetViews.at(i)->GetImageView(),
|
||||
m_state.om.renderTargetViews.at(i)->GetRenderLayout() };
|
||||
m_state.om.renderTargetViews[i]->GetImageView(),
|
||||
m_state.om.renderTargetViews[i]->GetRenderLayout() };
|
||||
}
|
||||
}
|
||||
|
||||
@ -3529,7 +3529,7 @@ namespace dxvk {
|
||||
return;
|
||||
|
||||
for (UINT i = 0; i < m_state.om.renderTargetViews.size(); i++) {
|
||||
m_state.om.renderTargetViews.at(i) = i < NumViews
|
||||
m_state.om.renderTargetViews[i] = i < NumViews
|
||||
? static_cast<D3D11RenderTargetView*>(ppRenderTargetViews[i])
|
||||
: nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user