mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[d3d9] Skip 0x0 clears
This commit is contained in:
parent
ceb3a7f8c6
commit
860237e775
@ -1602,6 +1602,10 @@ namespace dxvk {
|
|||||||
// This works around that.
|
// This works around that.
|
||||||
uint32_t alignment = m_d3d9Options.lenientClear ? 8 : 1;
|
uint32_t alignment = m_d3d9Options.lenientClear ? 8 : 1;
|
||||||
|
|
||||||
|
if (extent.width == 0 || extent.height == 0) {
|
||||||
|
return D3D_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Count) {
|
if (!Count) {
|
||||||
// Clear our viewport & scissor minified region in this rendertarget.
|
// Clear our viewport & scissor minified region in this rendertarget.
|
||||||
ClearViewRect(alignment, offset, extent);
|
ClearViewRect(alignment, offset, extent);
|
||||||
@ -1615,6 +1619,11 @@ namespace dxvk {
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (std::min<uint32_t>(pRects[i].x2, offset.x + extent.width) <= rectOffset.x
|
||||||
|
|| std::min<uint32_t>(pRects[i].y2, offset.y + extent.height) <= rectOffset.y) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
VkExtent3D rectExtent = {
|
VkExtent3D rectExtent = {
|
||||||
std::min<uint32_t>(pRects[i].x2, offset.x + extent.width) - rectOffset.x,
|
std::min<uint32_t>(pRects[i].x2, offset.x + extent.width) - rectOffset.x,
|
||||||
std::min<uint32_t>(pRects[i].y2, offset.y + extent.height) - rectOffset.y,
|
std::min<uint32_t>(pRects[i].y2, offset.y + extent.height) - rectOffset.y,
|
||||||
|
Loading…
Reference in New Issue
Block a user