mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-03 04:39:59 +00:00
Rasterizer: Correct introduced bug where a conditional render wouldn't stop a draw call from executing
This commit is contained in:
parent
7761e44d18
commit
433e764bb0
1 changed files with 16 additions and 10 deletions
|
@ -626,16 +626,8 @@ void RasterizerOpenGL::Clear() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerOpenGL::DrawPrelude() {
|
void RasterizerOpenGL::DrawPrelude() {
|
||||||
if (accelerate_draw == AccelDraw::Disabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
|
||||||
auto& gpu = system.GPU().Maxwell3D();
|
auto& gpu = system.GPU().Maxwell3D();
|
||||||
|
|
||||||
if (!gpu.ShouldExecute()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SyncColorMask();
|
SyncColorMask();
|
||||||
SyncFragmentColorClampState();
|
SyncFragmentColorClampState();
|
||||||
SyncMultiSampleState();
|
SyncMultiSampleState();
|
||||||
|
@ -754,9 +746,16 @@ struct DrawParams {
|
||||||
|
|
||||||
bool RasterizerOpenGL::DrawBatch(bool is_indexed) {
|
bool RasterizerOpenGL::DrawBatch(bool is_indexed) {
|
||||||
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
|
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
|
||||||
DrawPrelude();
|
|
||||||
|
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
||||||
|
|
||||||
auto& maxwell3d = system.GPU().Maxwell3D();
|
auto& maxwell3d = system.GPU().Maxwell3D();
|
||||||
|
if (!maxwell3d.ShouldExecute()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawPrelude();
|
||||||
|
|
||||||
const auto& regs = maxwell3d.regs;
|
const auto& regs = maxwell3d.regs;
|
||||||
const auto current_instance = maxwell3d.state.current_instance;
|
const auto current_instance = maxwell3d.state.current_instance;
|
||||||
DrawParams draw_call{};
|
DrawParams draw_call{};
|
||||||
|
@ -783,9 +782,16 @@ bool RasterizerOpenGL::DrawBatch(bool is_indexed) {
|
||||||
|
|
||||||
bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) {
|
bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) {
|
||||||
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
|
accelerate_draw = is_indexed ? AccelDraw::Indexed : AccelDraw::Arrays;
|
||||||
DrawPrelude();
|
|
||||||
|
MICROPROFILE_SCOPE(OpenGL_Drawing);
|
||||||
|
|
||||||
auto& maxwell3d = system.GPU().Maxwell3D();
|
auto& maxwell3d = system.GPU().Maxwell3D();
|
||||||
|
if (!maxwell3d.ShouldExecute()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawPrelude();
|
||||||
|
|
||||||
const auto& regs = maxwell3d.regs;
|
const auto& regs = maxwell3d.regs;
|
||||||
const auto& draw_setup = maxwell3d.mme_draw;
|
const auto& draw_setup = maxwell3d.mme_draw;
|
||||||
DrawParams draw_call{};
|
DrawParams draw_call{};
|
||||||
|
|
Loading…
Reference in a new issue