mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 13:54:18 +01:00
parent
92ee9c7ef1
commit
87dd8f0122
@ -925,6 +925,12 @@ namespace dxvk {
|
|||||||
blitInfo.srcOffsets[1] = pSourceRect != nullptr
|
blitInfo.srcOffsets[1] = pSourceRect != nullptr
|
||||||
? VkOffset3D{ int32_t(pSourceRect->right), int32_t(pSourceRect->bottom), 1 }
|
? VkOffset3D{ int32_t(pSourceRect->right), int32_t(pSourceRect->bottom), 1 }
|
||||||
: VkOffset3D{ int32_t(srcExtent.width), int32_t(srcExtent.height), 1 };
|
: VkOffset3D{ int32_t(srcExtent.width), int32_t(srcExtent.height), 1 };
|
||||||
|
|
||||||
|
if (unlikely(IsBlitRegionInvalid(blitInfo.srcOffsets, srcExtent)))
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
|
if (unlikely(IsBlitRegionInvalid(blitInfo.dstOffsets, dstExtent)))
|
||||||
|
return D3DERR_INVALIDCALL;
|
||||||
|
|
||||||
VkExtent3D srcCopyExtent =
|
VkExtent3D srcCopyExtent =
|
||||||
{ uint32_t(blitInfo.srcOffsets[1].x - blitInfo.srcOffsets[0].x),
|
{ uint32_t(blitInfo.srcOffsets[1].x - blitInfo.srcOffsets[0].x),
|
||||||
|
@ -247,6 +247,16 @@ namespace dxvk {
|
|||||||
|| (srcFormat == D3D9Format::A4R4G4B4 && dstFormat == D3D9Format::X4R4G4B4);
|
|| (srcFormat == D3D9Format::A4R4G4B4 && dstFormat == D3D9Format::X4R4G4B4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool IsBlitRegionInvalid(VkOffset3D offsets[2], VkExtent3D extent) {
|
||||||
|
// Only bother checking x, y as we don't have 3D blits.
|
||||||
|
return offsets[1].x < offsets[0].x ||
|
||||||
|
offsets[1].y < offsets[0].y ||
|
||||||
|
offsets[0].x < 0 ||
|
||||||
|
offsets[0].y < 0 ||
|
||||||
|
offsets[1].x > extent.width ||
|
||||||
|
offsets[1].y > extent.height;
|
||||||
|
}
|
||||||
|
|
||||||
enum D3D9TextureStageStateTypes : uint32_t
|
enum D3D9TextureStageStateTypes : uint32_t
|
||||||
{
|
{
|
||||||
DXVK_TSS_COLOROP = 0,
|
DXVK_TSS_COLOROP = 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user