mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[dxvk] Only merge clears when framebuffer size matches view size
Otherwise, we'll only clear a smaller portion of the view, which is incorrect. Fixes a rendering issue in Fallout New Vegas with DXUP.
This commit is contained in:
parent
405bd737e0
commit
c451c9a95e
@ -532,11 +532,12 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check whether the render target view is an attachment
|
// Check whether the render target view is an attachment
|
||||||
// of the current framebuffer. If not, we need to create
|
// of the current framebuffer and is included entirely.
|
||||||
// a temporary framebuffer.
|
// If not, we need to create a temporary framebuffer.
|
||||||
int32_t attachmentIndex = -1;
|
int32_t attachmentIndex = -1;
|
||||||
|
|
||||||
if (m_state.om.framebuffer != nullptr)
|
if (m_state.om.framebuffer != nullptr
|
||||||
|
&& m_state.om.framebuffer->isFullSize(imageView))
|
||||||
attachmentIndex = m_state.om.framebuffer->findAttachment(imageView);
|
attachmentIndex = m_state.om.framebuffer->findAttachment(imageView);
|
||||||
|
|
||||||
if (attachmentIndex < 0) {
|
if (attachmentIndex < 0) {
|
||||||
|
@ -71,6 +71,13 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DxvkFramebuffer::isFullSize(const Rc<DxvkImageView>& view) const {
|
||||||
|
return m_renderSize.width == view->mipLevelExtent(0).width
|
||||||
|
&& m_renderSize.height == view->mipLevelExtent(0).height
|
||||||
|
&& m_renderSize.layers == view->info().numLayers;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DxvkRenderPassFormat DxvkFramebuffer::getRenderPassFormat(const DxvkRenderTargets& renderTargets) {
|
DxvkRenderPassFormat DxvkFramebuffer::getRenderPassFormat(const DxvkRenderTargets& renderTargets) {
|
||||||
DxvkRenderPassFormat format;
|
DxvkRenderPassFormat format;
|
||||||
|
|
||||||
|
@ -176,8 +176,19 @@ namespace dxvk {
|
|||||||
* \returns \c true if the render targets are the same
|
* \returns \c true if the render targets are the same
|
||||||
* as the ones used for this framebuffer object.
|
* as the ones used for this framebuffer object.
|
||||||
*/
|
*/
|
||||||
bool hasTargets(
|
bool hasTargets(const DxvkRenderTargets& renderTargets);
|
||||||
const DxvkRenderTargets& renderTargets);
|
|
||||||
|
/**
|
||||||
|
* \brief Checks whether view and framebuffer sizes match
|
||||||
|
*
|
||||||
|
* Tests whether the size of the framebuffer is the same
|
||||||
|
* as the size of one of its views. This may be \c false
|
||||||
|
* when mixing attachments with mismatched dimensions.
|
||||||
|
* \param [in] view Image view to test
|
||||||
|
* \returns \c true if \c view has the same size as
|
||||||
|
* the framebuffer.
|
||||||
|
*/
|
||||||
|
bool isFullSize(const Rc<DxvkImageView>& view) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Generatess render pass format
|
* \brief Generatess render pass format
|
||||||
|
Loading…
x
Reference in New Issue
Block a user