mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 12:30:15 +00:00
Rasterizer: Shorten code using helper variables
This commit is contained in:
parent
431df448ef
commit
537ba32167
@ -344,6 +344,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0,
|
|||||||
{
|
{
|
||||||
const auto& regs = g_state.regs;
|
const auto& regs = g_state.regs;
|
||||||
const auto& framebuffer = regs.framebuffer;
|
const auto& framebuffer = regs.framebuffer;
|
||||||
|
const auto& output_merger = regs.output_merger;
|
||||||
MICROPROFILE_SCOPE(GPU_Rasterization);
|
MICROPROFILE_SCOPE(GPU_Rasterization);
|
||||||
|
|
||||||
// vertex positions in rasterizer coordinates
|
// vertex positions in rasterizer coordinates
|
||||||
@ -424,8 +425,8 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0,
|
|||||||
auto textures = regs.GetTextures();
|
auto textures = regs.GetTextures();
|
||||||
auto tev_stages = regs.GetTevStages();
|
auto tev_stages = regs.GetTevStages();
|
||||||
|
|
||||||
bool stencil_action_enable = g_state.regs.output_merger.stencil_test.enable && framebuffer.depth_format == Regs::DepthFormat::D24S8;
|
bool stencil_action_enable = output_merger.stencil_test.enable && framebuffer.depth_format == Regs::DepthFormat::D24S8;
|
||||||
const auto stencil_test = g_state.regs.output_merger.stencil_test;
|
const auto stencil_test = output_merger.stencil_test;
|
||||||
|
|
||||||
// Enter rasterization loop, starting at the center of the topleft bounding box corner.
|
// Enter rasterization loop, starting at the center of the topleft bounding box corner.
|
||||||
// TODO: Not sure if looping through x first might be faster
|
// TODO: Not sure if looping through x first might be faster
|
||||||
@ -841,7 +842,6 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& output_merger = regs.output_merger;
|
|
||||||
// TODO: Does alpha testing happen before or after stencil?
|
// TODO: Does alpha testing happen before or after stencil?
|
||||||
if (output_merger.alpha_test.enable) {
|
if (output_merger.alpha_test.enable) {
|
||||||
bool pass = false;
|
bool pass = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user