mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 04:29:14 +01:00
[dxvk] fix missing renderPassEnd calls
vkCmdBlitImage and vkCmdResolveImage need to be called outside a render pass. flatten logic. this fixes mipmap generation with Trackmania.
This commit is contained in:
parent
952ac5d5f9
commit
f88a1d5dce
@ -259,7 +259,9 @@ namespace dxvk {
|
||||
const Rc<DxvkBuffer>& srcBuffer,
|
||||
VkDeviceSize srcOffset,
|
||||
VkDeviceSize numBytes) {
|
||||
if (numBytes != 0) {
|
||||
if (numBytes == 0)
|
||||
return;
|
||||
|
||||
this->renderPassEnd();
|
||||
|
||||
auto dstSlice = dstBuffer->subSlice(dstOffset, numBytes);
|
||||
@ -292,7 +294,6 @@ namespace dxvk {
|
||||
m_cmd->trackResource(dstBuffer->resource());
|
||||
m_cmd->trackResource(srcBuffer->resource());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::copyBufferToImage(
|
||||
@ -616,6 +617,8 @@ namespace dxvk {
|
||||
if (subresources.levelCount <= 1)
|
||||
return;
|
||||
|
||||
this->renderPassEnd();
|
||||
|
||||
// The top-most level will only be read. We can
|
||||
// discard the contents of all the lower levels
|
||||
// since we're going to override them anyway.
|
||||
@ -757,6 +760,8 @@ namespace dxvk {
|
||||
const VkImageSubresourceLayers& dstSubresources,
|
||||
const Rc<DxvkImage>& srcImage,
|
||||
const VkImageSubresourceLayers& srcSubresources) {
|
||||
this->renderPassEnd();
|
||||
|
||||
VkImageSubresourceRange dstSubresourceRange = {
|
||||
dstSubresources.aspectMask,
|
||||
dstSubresources.mipLevel, 1,
|
||||
@ -828,9 +833,11 @@ namespace dxvk {
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize size,
|
||||
const void* data) {
|
||||
if (size == 0)
|
||||
return;
|
||||
|
||||
this->renderPassEnd();
|
||||
|
||||
if (size != 0) {
|
||||
auto physicalSlice = buffer->subSlice(offset, size);
|
||||
|
||||
// Vulkan specifies that small amounts of data (up to 64kB) can
|
||||
@ -865,7 +872,6 @@ namespace dxvk {
|
||||
|
||||
m_cmd->trackResource(buffer->resource());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DxvkContext::updateImage(
|
||||
|
Loading…
x
Reference in New Issue
Block a user