mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 21:42:58 +00:00
gl_rasterizer: Fix rescale dirty state checking
This commit is contained in:
parent
f086c82e1f
commit
9bc7b04ca5
|
@ -533,7 +533,8 @@ void RasterizerOpenGL::SyncViewport() {
|
||||||
auto& flags = maxwell3d.dirty.flags;
|
auto& flags = maxwell3d.dirty.flags;
|
||||||
const auto& regs = maxwell3d.regs;
|
const auto& regs = maxwell3d.regs;
|
||||||
|
|
||||||
const bool dirty_viewport = flags[Dirty::Viewports];
|
const bool rescale_viewports = flags[VideoCommon::Dirty::RescaleViewports];
|
||||||
|
const bool dirty_viewport = flags[Dirty::Viewports] || rescale_viewports;
|
||||||
const bool dirty_clip_control = flags[Dirty::ClipControl];
|
const bool dirty_clip_control = flags[Dirty::ClipControl];
|
||||||
|
|
||||||
if (dirty_clip_control || flags[Dirty::FrontFace]) {
|
if (dirty_clip_control || flags[Dirty::FrontFace]) {
|
||||||
|
@ -574,8 +575,9 @@ void RasterizerOpenGL::SyncViewport() {
|
||||||
if (dirty_viewport) {
|
if (dirty_viewport) {
|
||||||
flags[Dirty::Viewports] = false;
|
flags[Dirty::Viewports] = false;
|
||||||
|
|
||||||
const bool force = flags[Dirty::ViewportTransform];
|
const bool force = flags[Dirty::ViewportTransform] || rescale_viewports;
|
||||||
flags[Dirty::ViewportTransform] = false;
|
flags[Dirty::ViewportTransform] = false;
|
||||||
|
flags[VideoCommon::Dirty::RescaleViewports] = false;
|
||||||
|
|
||||||
const auto& resolution = Settings::values.resolution_info;
|
const auto& resolution = Settings::values.resolution_info;
|
||||||
const auto scale_up = [&](u32 value) -> u32 {
|
const auto scale_up = [&](u32 value) -> u32 {
|
||||||
|
@ -911,11 +913,14 @@ void RasterizerOpenGL::SyncLogicOpState() {
|
||||||
|
|
||||||
void RasterizerOpenGL::SyncScissorTest() {
|
void RasterizerOpenGL::SyncScissorTest() {
|
||||||
auto& flags = maxwell3d.dirty.flags;
|
auto& flags = maxwell3d.dirty.flags;
|
||||||
if (!flags[Dirty::Scissors]) {
|
if (!flags[Dirty::Scissors] && !flags[VideoCommon::Dirty::RescaleScissors]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
flags[Dirty::Scissors] = false;
|
flags[Dirty::Scissors] = false;
|
||||||
|
|
||||||
|
const bool force = flags[VideoCommon::Dirty::RescaleScissors];
|
||||||
|
flags[VideoCommon::Dirty::RescaleScissors] = false;
|
||||||
|
|
||||||
const auto& regs = maxwell3d.regs;
|
const auto& regs = maxwell3d.regs;
|
||||||
|
|
||||||
const auto& resolution = Settings::values.resolution_info;
|
const auto& resolution = Settings::values.resolution_info;
|
||||||
|
@ -927,7 +932,7 @@ void RasterizerOpenGL::SyncScissorTest() {
|
||||||
return std::max<u32>(converted_value, 1U);
|
return std::max<u32>(converted_value, 1U);
|
||||||
};
|
};
|
||||||
for (std::size_t index = 0; index < Maxwell::NumViewports; ++index) {
|
for (std::size_t index = 0; index < Maxwell::NumViewports; ++index) {
|
||||||
if (!flags[Dirty::Scissor0 + index]) {
|
if (!force && !flags[Dirty::Scissor0 + index]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
flags[Dirty::Scissor0 + index] = false;
|
flags[Dirty::Scissor0 + index] = false;
|
||||||
|
|
Loading…
Reference in a new issue