1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 10:54:16 +01:00

[hud] Explicitly set up viewport state

This commit is contained in:
Philip Rebohle 2021-02-27 15:06:01 +01:00 committed by Joshie
parent 869190964f
commit 277a4f0206

View File

@ -78,6 +78,19 @@ namespace dxvk::hud {
VkExtent2D surfaceSize) {
bool isSrgb = imageFormatInfo(surfaceFormat.format)->flags.test(DxvkFormatFlag::ColorSpaceSrgb);
VkViewport viewport;
viewport.x = 0.0f;
viewport.y = 0.0f;
viewport.width = float(surfaceSize.width);
viewport.height = float(surfaceSize.height);
viewport.minDepth = 0.0f;
viewport.maxDepth = 1.0f;
VkRect2D scissor;
scissor.offset = { 0, 0 };
scissor.extent = surfaceSize;
ctx->setViewports(1, &viewport, &scissor);
ctx->setRasterizerState(m_rsState);
ctx->setBlendMode(0, m_blendMode);