mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 04:08:52 +01:00
[d3d11] Optimize viewport updates if there is only one single viewport
This commit is contained in:
parent
160b684d5a
commit
c852b6de34
@ -3219,16 +3219,27 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EmitCs([
|
if (likely(viewportCount == 1)) {
|
||||||
cViewportCount = viewportCount,
|
EmitCs([
|
||||||
cViewports = viewports,
|
cViewport = viewports[0],
|
||||||
cScissors = scissors
|
cScissor = scissors[0]
|
||||||
] (DxvkContext* ctx) {
|
] (DxvkContext* ctx) {
|
||||||
ctx->setViewports(
|
ctx->setViewports(1,
|
||||||
cViewportCount,
|
&cViewport,
|
||||||
cViewports.data(),
|
&cScissor);
|
||||||
cScissors.data());
|
});
|
||||||
});
|
} else {
|
||||||
|
EmitCs([
|
||||||
|
cViewportCount = viewportCount,
|
||||||
|
cViewports = viewports,
|
||||||
|
cScissors = scissors
|
||||||
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->setViewports(
|
||||||
|
cViewportCount,
|
||||||
|
cViewports.data(),
|
||||||
|
cScissors.data());
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user