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,6 +3219,16 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (likely(viewportCount == 1)) {
|
||||||
|
EmitCs([
|
||||||
|
cViewport = viewports[0],
|
||||||
|
cScissor = scissors[0]
|
||||||
|
] (DxvkContext* ctx) {
|
||||||
|
ctx->setViewports(1,
|
||||||
|
&cViewport,
|
||||||
|
&cScissor);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
EmitCs([
|
EmitCs([
|
||||||
cViewportCount = viewportCount,
|
cViewportCount = viewportCount,
|
||||||
cViewports = viewports,
|
cViewports = viewports,
|
||||||
@ -3230,6 +3240,7 @@ namespace dxvk {
|
|||||||
cScissors.data());
|
cScissors.data());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<DxbcProgramType ShaderStage>
|
template<DxbcProgramType ShaderStage>
|
||||||
|
Loading…
Reference in New Issue
Block a user