mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 07:24:15 +01:00
[dxvk] Remove store op from render pass ops
This is always going to be VK_ATTACHMENT_STORE_OP_STORE anyway.
This commit is contained in:
parent
c0f72940dd
commit
0245273ab7
@ -1707,15 +1707,12 @@ namespace dxvk {
|
|||||||
DxvkColorAttachmentOps colorOp;
|
DxvkColorAttachmentOps colorOp;
|
||||||
colorOp.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
colorOp.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
colorOp.loadLayout = imageView->imageInfo().layout;
|
colorOp.loadLayout = imageView->imageInfo().layout;
|
||||||
colorOp.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
colorOp.storeLayout = imageView->imageInfo().layout;
|
colorOp.storeLayout = imageView->imageInfo().layout;
|
||||||
|
|
||||||
DxvkDepthAttachmentOps depthOp;
|
DxvkDepthAttachmentOps depthOp;
|
||||||
depthOp.loadOpD = VK_ATTACHMENT_LOAD_OP_LOAD;
|
depthOp.loadOpD = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
depthOp.loadOpS = VK_ATTACHMENT_LOAD_OP_LOAD;
|
depthOp.loadOpS = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
depthOp.loadLayout = imageView->imageInfo().layout;
|
depthOp.loadLayout = imageView->imageInfo().layout;
|
||||||
depthOp.storeOpD = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
depthOp.storeOpS = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
depthOp.storeLayout = imageView->imageInfo().layout;
|
depthOp.storeLayout = imageView->imageInfo().layout;
|
||||||
|
|
||||||
if (clearAspects & VK_IMAGE_ASPECT_COLOR_BIT)
|
if (clearAspects & VK_IMAGE_ASPECT_COLOR_BIT)
|
||||||
@ -1802,13 +1799,11 @@ namespace dxvk {
|
|||||||
|
|
||||||
if (clearAspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
if (clearAspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
|
||||||
m_state.om.renderPassOps.depthOps.loadOpD = depthOp.loadOpD;
|
m_state.om.renderPassOps.depthOps.loadOpD = depthOp.loadOpD;
|
||||||
m_state.om.renderPassOps.depthOps.storeOpD = depthOp.storeOpD;
|
|
||||||
m_state.om.clearValues[attachmentIndex].depthStencil.depth = clearValue.depthStencil.depth;
|
m_state.om.clearValues[attachmentIndex].depthStencil.depth = clearValue.depthStencil.depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clearAspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
if (clearAspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
|
||||||
m_state.om.renderPassOps.depthOps.loadOpS = depthOp.loadOpS;
|
m_state.om.renderPassOps.depthOps.loadOpS = depthOp.loadOpS;
|
||||||
m_state.om.renderPassOps.depthOps.storeOpS = depthOp.storeOpS;
|
|
||||||
m_state.om.clearValues[attachmentIndex].depthStencil.stencil = clearValue.depthStencil.stencil;
|
m_state.om.clearValues[attachmentIndex].depthStencil.stencil = clearValue.depthStencil.stencil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2664,7 +2659,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
ops.colorOps[0].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
ops.colorOps[0].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
ops.colorOps[0].loadLayout = imageView->imageInfo().layout;
|
ops.colorOps[0].loadLayout = imageView->imageInfo().layout;
|
||||||
ops.colorOps[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
ops.colorOps[0].storeLayout = imageView->imageInfo().layout;
|
ops.colorOps[0].storeLayout = imageView->imageInfo().layout;
|
||||||
} else {
|
} else {
|
||||||
clearStages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
|
clearStages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
|
||||||
@ -2677,8 +2671,6 @@ namespace dxvk {
|
|||||||
ops.depthOps.loadOpD = VK_ATTACHMENT_LOAD_OP_LOAD;
|
ops.depthOps.loadOpD = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
ops.depthOps.loadOpS = VK_ATTACHMENT_LOAD_OP_LOAD;
|
ops.depthOps.loadOpS = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||||
ops.depthOps.loadLayout = imageView->imageInfo().layout;
|
ops.depthOps.loadLayout = imageView->imageInfo().layout;
|
||||||
ops.depthOps.storeOpD = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
ops.depthOps.storeOpS = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
ops.depthOps.storeLayout = imageView->imageInfo().layout;
|
ops.depthOps.storeLayout = imageView->imageInfo().layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3557,8 +3549,6 @@ namespace dxvk {
|
|||||||
VK_ATTACHMENT_LOAD_OP_LOAD,
|
VK_ATTACHMENT_LOAD_OP_LOAD,
|
||||||
VK_ATTACHMENT_LOAD_OP_LOAD,
|
VK_ATTACHMENT_LOAD_OP_LOAD,
|
||||||
renderTargets.depth.view->imageInfo().layout,
|
renderTargets.depth.view->imageInfo().layout,
|
||||||
VK_ATTACHMENT_STORE_OP_STORE,
|
|
||||||
VK_ATTACHMENT_STORE_OP_STORE,
|
|
||||||
renderTargets.depth.view->imageInfo().layout };
|
renderTargets.depth.view->imageInfo().layout };
|
||||||
|
|
||||||
renderPassOps.barrier.srcStages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
|
renderPassOps.barrier.srcStages |= VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
|
||||||
@ -3577,7 +3567,6 @@ namespace dxvk {
|
|||||||
renderPassOps.colorOps[i] = DxvkColorAttachmentOps {
|
renderPassOps.colorOps[i] = DxvkColorAttachmentOps {
|
||||||
VK_ATTACHMENT_LOAD_OP_LOAD,
|
VK_ATTACHMENT_LOAD_OP_LOAD,
|
||||||
renderTargets.color[i].view->imageInfo().layout,
|
renderTargets.color[i].view->imageInfo().layout,
|
||||||
VK_ATTACHMENT_STORE_OP_STORE,
|
|
||||||
renderTargets.color[i].view->imageInfo().layout };
|
renderTargets.color[i].view->imageInfo().layout };
|
||||||
|
|
||||||
renderPassOps.barrier.srcStages |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
renderPassOps.barrier.srcStages |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||||
|
@ -88,7 +88,7 @@ namespace dxvk {
|
|||||||
desc.format = m_format.color[i].format;
|
desc.format = m_format.color[i].format;
|
||||||
desc.samples = m_format.sampleCount;
|
desc.samples = m_format.sampleCount;
|
||||||
desc.loadOp = ops.colorOps[i].loadOp;
|
desc.loadOp = ops.colorOps[i].loadOp;
|
||||||
desc.storeOp = ops.colorOps[i].storeOp;
|
desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
||||||
desc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
desc.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
||||||
desc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
desc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
||||||
desc.initialLayout = ops.colorOps[i].loadLayout;
|
desc.initialLayout = ops.colorOps[i].loadLayout;
|
||||||
@ -110,9 +110,9 @@ namespace dxvk {
|
|||||||
desc.format = m_format.depth.format;
|
desc.format = m_format.depth.format;
|
||||||
desc.samples = m_format.sampleCount;
|
desc.samples = m_format.sampleCount;
|
||||||
desc.loadOp = ops.depthOps.loadOpD;
|
desc.loadOp = ops.depthOps.loadOpD;
|
||||||
desc.storeOp = ops.depthOps.storeOpD;
|
desc.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
||||||
desc.stencilLoadOp = ops.depthOps.loadOpS;
|
desc.stencilLoadOp = ops.depthOps.loadOpS;
|
||||||
desc.stencilStoreOp = ops.depthOps.storeOpS;
|
desc.stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE;
|
||||||
desc.initialLayout = ops.depthOps.loadLayout;
|
desc.initialLayout = ops.depthOps.loadLayout;
|
||||||
desc.finalLayout = ops.depthOps.storeLayout;
|
desc.finalLayout = ops.depthOps.storeLayout;
|
||||||
|
|
||||||
@ -248,15 +248,12 @@ namespace dxvk {
|
|||||||
eq &= a.depthOps.loadOpD == b.depthOps.loadOpD
|
eq &= a.depthOps.loadOpD == b.depthOps.loadOpD
|
||||||
&& a.depthOps.loadOpS == b.depthOps.loadOpS
|
&& a.depthOps.loadOpS == b.depthOps.loadOpS
|
||||||
&& a.depthOps.loadLayout == b.depthOps.loadLayout
|
&& a.depthOps.loadLayout == b.depthOps.loadLayout
|
||||||
&& a.depthOps.storeOpD == b.depthOps.storeOpD
|
|
||||||
&& a.depthOps.storeOpS == b.depthOps.storeOpS
|
|
||||||
&& a.depthOps.storeLayout == b.depthOps.storeLayout;
|
&& a.depthOps.storeLayout == b.depthOps.storeLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t i = 0; i < MaxNumRenderTargets && eq; i++) {
|
for (uint32_t i = 0; i < MaxNumRenderTargets && eq; i++) {
|
||||||
eq &= a.colorOps[i].loadOp == b.colorOps[i].loadOp
|
eq &= a.colorOps[i].loadOp == b.colorOps[i].loadOp
|
||||||
&& a.colorOps[i].loadLayout == b.colorOps[i].loadLayout
|
&& a.colorOps[i].loadLayout == b.colorOps[i].loadLayout
|
||||||
&& a.colorOps[i].storeOp == b.colorOps[i].storeOp
|
|
||||||
&& a.colorOps[i].storeLayout == b.colorOps[i].storeLayout;
|
&& a.colorOps[i].storeLayout == b.colorOps[i].storeLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ namespace dxvk {
|
|||||||
struct DxvkColorAttachmentOps {
|
struct DxvkColorAttachmentOps {
|
||||||
VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
||||||
VkImageLayout loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
VkImageLayout loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||||
VkAttachmentStoreOp storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
VkImageLayout storeLayout = VK_IMAGE_LAYOUT_GENERAL;
|
VkImageLayout storeLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,8 +64,6 @@ namespace dxvk {
|
|||||||
VkAttachmentLoadOp loadOpD = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
VkAttachmentLoadOp loadOpD = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
||||||
VkAttachmentLoadOp loadOpS = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
VkAttachmentLoadOp loadOpS = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
||||||
VkImageLayout loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
VkImageLayout loadLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||||
VkAttachmentStoreOp storeOpD = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
VkAttachmentStoreOp storeOpS = VK_ATTACHMENT_STORE_OP_STORE;
|
|
||||||
VkImageLayout storeLayout = VK_IMAGE_LAYOUT_GENERAL;
|
VkImageLayout storeLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user