summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer.cpp
diff options
context:
space:
mode:
authorRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-18 07:44:48 +0100
committerRodolfo Bogado <rodolfoosvaldobogado@gmail.com>2018-11-18 07:44:48 +0100
commit4d1a0a24cc753d6655b07b74f3f0f098a4d588d1 (patch)
tree6c1e876151b7eba73a38d223c45229a450bb3260 /src/video_core/renderer_opengl/gl_rasterizer.cpp
parentfix sampler configuration, thanks to Marcos for his investigation (diff)
downloadyuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar.gz
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar.bz2
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar.lz
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar.xz
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.tar.zst
yuzu-4d1a0a24cc753d6655b07b74f3f0f098a4d588d1.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 3fe8ceb41..8c92ceb21 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -1077,15 +1077,15 @@ void RasterizerOpenGL::SyncBlendState() {
state.independant_blend.enabled = regs.independent_blend_enable;
if (!state.independant_blend.enabled) {
auto& blend = state.blend[0];
- blend.enabled = regs.blend.enable[0] != 0;
- blend.separate_alpha = regs.blend.separate_alpha;
- blend.rgb_equation = MaxwellToGL::BlendEquation(regs.blend.equation_rgb);
- blend.src_rgb_func = MaxwellToGL::BlendFunc(regs.blend.factor_source_rgb);
- blend.dst_rgb_func = MaxwellToGL::BlendFunc(regs.blend.factor_dest_rgb);
- if (blend.separate_alpha) {
- blend.a_equation = MaxwellToGL::BlendEquation(regs.blend.equation_a);
- blend.src_a_func = MaxwellToGL::BlendFunc(regs.blend.factor_source_a);
- blend.dst_a_func = MaxwellToGL::BlendFunc(regs.blend.factor_dest_a);
+ const auto& src = regs.blend;
+ blend.enabled = src.enable[0] != 0;
+ if (blend.enabled) {
+ blend.rgb_equation = MaxwellToGL::BlendEquation(src.equation_rgb);
+ blend.src_rgb_func = MaxwellToGL::BlendFunc(src.factor_source_rgb);
+ blend.dst_rgb_func = MaxwellToGL::BlendFunc(src.factor_dest_rgb);
+ blend.a_equation = MaxwellToGL::BlendEquation(src.equation_a);
+ blend.src_a_func = MaxwellToGL::BlendFunc(src.factor_source_a);
+ blend.dst_a_func = MaxwellToGL::BlendFunc(src.factor_dest_a);
}
for (std::size_t i = 1; i < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets; i++) {
state.blend[i].enabled = false;
@@ -1095,18 +1095,16 @@ void RasterizerOpenGL::SyncBlendState() {
for (std::size_t i = 0; i < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets; i++) {
auto& blend = state.blend[i];
+ const auto& src = regs.independent_blend[i];
blend.enabled = regs.blend.enable[i] != 0;
if (!blend.enabled)
continue;
- blend.separate_alpha = regs.independent_blend[i].separate_alpha;
- blend.rgb_equation = MaxwellToGL::BlendEquation(regs.independent_blend[i].equation_rgb);
- blend.src_rgb_func = MaxwellToGL::BlendFunc(regs.independent_blend[i].factor_source_rgb);
- blend.dst_rgb_func = MaxwellToGL::BlendFunc(regs.independent_blend[i].factor_dest_rgb);
- if (blend.separate_alpha) {
- blend.a_equation = MaxwellToGL::BlendEquation(regs.independent_blend[i].equation_a);
- blend.src_a_func = MaxwellToGL::BlendFunc(regs.independent_blend[i].factor_source_a);
- blend.dst_a_func = MaxwellToGL::BlendFunc(regs.independent_blend[i].factor_dest_a);
- }
+ blend.rgb_equation = MaxwellToGL::BlendEquation(src.equation_rgb);
+ blend.src_rgb_func = MaxwellToGL::BlendFunc(src.factor_source_rgb);
+ blend.dst_rgb_func = MaxwellToGL::BlendFunc(src.factor_dest_rgb);
+ blend.a_equation = MaxwellToGL::BlendEquation(src.equation_a);
+ blend.src_a_func = MaxwellToGL::BlendFunc(src.factor_source_a);
+ blend.dst_a_func = MaxwellToGL::BlendFunc(src.factor_dest_a);
}
}