mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-30 02:52:10 +01:00
[d3d11] Fix box validation in CopySubresourceRegion1
This commit is contained in:
parent
9f80d9f8b2
commit
08a6b42458
@ -317,6 +317,12 @@ namespace dxvk {
|
||||
if (!pDstResource || !pSrcResource)
|
||||
return;
|
||||
|
||||
if (pSrcBox
|
||||
&& (pSrcBox->left >= pSrcBox->right
|
||||
|| pSrcBox->top >= pSrcBox->bottom
|
||||
|| pSrcBox->front >= pSrcBox->back))
|
||||
return;
|
||||
|
||||
D3D11_RESOURCE_DIMENSION dstResourceDim = D3D11_RESOURCE_DIMENSION_UNKNOWN;
|
||||
D3D11_RESOURCE_DIMENSION srcResourceDim = D3D11_RESOURCE_DIMENSION_UNKNOWN;
|
||||
|
||||
@ -332,9 +338,6 @@ namespace dxvk {
|
||||
VkDeviceSize byteCount = -1;
|
||||
|
||||
if (pSrcBox) {
|
||||
if (pSrcBox->left >= pSrcBox->right)
|
||||
return; // no-op, but legal
|
||||
|
||||
srcOffset = pSrcBox->left;
|
||||
byteCount = pSrcBox->right - pSrcBox->left;
|
||||
}
|
||||
@ -360,11 +363,6 @@ namespace dxvk {
|
||||
VkExtent3D srcExtent = srcTexture->MipLevelExtent(srcLayers.mipLevel);
|
||||
|
||||
if (pSrcBox != nullptr) {
|
||||
if (pSrcBox->left >= pSrcBox->right
|
||||
|| pSrcBox->top >= pSrcBox->bottom
|
||||
|| pSrcBox->front >= pSrcBox->back)
|
||||
return; // no-op, but legal
|
||||
|
||||
srcOffset.x = pSrcBox->left;
|
||||
srcOffset.y = pSrcBox->top;
|
||||
srcOffset.z = pSrcBox->front;
|
||||
|
Loading…
x
Reference in New Issue
Block a user