Commit ebcab688 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Respect specific mip size for implicit viewport in SetRenderTarget

Closes #1295
parent 3cfc16ea
Pipeline #989 passed with stage
in 4 minutes and 5 seconds
......@@ -1134,19 +1134,22 @@ namespace dxvk {
return D3DERR_INVALIDCALL;
if (RenderTargetIndex == 0) {
uint32_t width = std::max(1u, desc->Width >> rt->GetMipLevel());
uint32_t height = std::max(1u, desc->Height >> rt->GetMipLevel());
D3DVIEWPORT9 viewport;
viewport.X = 0;
viewport.Y = 0;
viewport.Width = desc->Width;
viewport.Height = desc->Height;
viewport.Width = width;
viewport.Height = height;
viewport.MinZ = 0.0f;
viewport.MaxZ = 1.0f;
RECT scissorRect;
scissorRect.left = 0;
scissorRect.top = 0;
scissorRect.right = desc->Width;
scissorRect.bottom = desc->Height;
scissorRect.right = width;
scissorRect.bottom = height;
if (m_state.viewport != viewport) {
m_flags.set(D3D9DeviceFlag::DirtyFFViewport);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment