Fix stale viewport and scissor after surface clip change (#371)
Mark viewports dirty when the surface clip changes, and refresh scissors whenever viewports are updated. Both depend on the surface clip and the window origin.
This commit is contained in:
parent
857b057471
commit
08da19bd2b
|
|
@ -1028,6 +1028,7 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg
|
|||
if (!state_tracker.TouchViewports()) {
|
||||
return;
|
||||
}
|
||||
maxwell3d->dirty.flags[Dirty::Scissors] = true;
|
||||
if (!regs.viewport_scale_offset_enabled) {
|
||||
const auto x = static_cast<float>(regs.surface_clip.x);
|
||||
float y = static_cast<float>(regs.surface_clip.y);
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ Flags MakeInvalidationFlags() {
|
|||
void SetupDirtyViewports(Tables& tables) {
|
||||
FillBlock(tables[0], OFF(viewport_transform), NUM(viewport_transform), Viewports);
|
||||
FillBlock(tables[0], OFF(viewports), NUM(viewports), Viewports);
|
||||
FillBlock(tables[1], OFF(surface_clip), NUM(surface_clip), Viewports);
|
||||
tables[0][OFF(viewport_scale_offset_enabled)] = Viewports;
|
||||
tables[1][OFF(window_origin)] = Viewports;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue