1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 05:52:11 +01:00

[d3d11] Fix incorrect behaviour when a scissor rect is not specified

This commit is contained in:
Philip Rebohle 2019-06-13 02:16:12 +02:00
parent 78071c750d
commit 5ff9c33855
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -3129,7 +3129,17 @@ namespace dxvk {
}
for (uint32_t i = 0; i < m_state.rs.numViewports; i++) {
if (enableScissorTest && (i < m_state.rs.numScissors)) {
if (!enableScissorTest) {
scissors[i] = VkRect2D {
VkOffset2D { 0, 0 },
VkExtent2D {
D3D11_VIEWPORT_BOUNDS_MAX,
D3D11_VIEWPORT_BOUNDS_MAX } };
} else if (i >= m_state.rs.numScissors) {
scissors[i] = VkRect2D {
VkOffset2D { 0, 0 },
VkExtent2D { 0, 0 } };
} else {
D3D11_RECT sr = m_state.rs.scissors[i];
VkOffset2D srPosA;
@ -3145,12 +3155,6 @@ namespace dxvk {
srSize.height = uint32_t(srPosB.y - srPosA.y);
scissors[i] = VkRect2D { srPosA, srSize };
} else {
scissors[i] = VkRect2D {
VkOffset2D { 0, 0 },
VkExtent2D {
D3D11_VIEWPORT_BOUNDS_MAX,
D3D11_VIEWPORT_BOUNDS_MAX } };
}
}