summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.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_state.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 '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp61
1 files changed, 19 insertions, 42 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index f6d80614b..d9910c6e8 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -309,27 +309,16 @@ void OpenGLState::ApplyGlobalBlending() const {
if (!updated.enabled) {
return;
}
- if (updated.separate_alpha) {
- if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
- updated.dst_rgb_func != current.dst_rgb_func ||
- updated.src_a_func != current.src_a_func || updated.dst_a_func != current.dst_a_func) {
- glBlendFuncSeparate(updated.src_rgb_func, updated.dst_rgb_func, updated.src_a_func,
- updated.dst_a_func);
- }
-
- if (blend_changed || updated.rgb_equation != current.rgb_equation ||
- updated.a_equation != current.a_equation) {
- glBlendEquationSeparate(updated.rgb_equation, updated.a_equation);
- }
- } else {
- if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
- updated.dst_rgb_func != current.dst_rgb_func) {
- glBlendFunc(updated.src_rgb_func, updated.dst_rgb_func);
- }
+ if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
+ updated.dst_rgb_func != current.dst_rgb_func || updated.src_a_func != current.src_a_func ||
+ updated.dst_a_func != current.dst_a_func) {
+ glBlendFuncSeparate(updated.src_rgb_func, updated.dst_rgb_func, updated.src_a_func,
+ updated.dst_a_func);
+ }
- if (blend_changed || updated.rgb_equation != current.rgb_equation) {
- glBlendEquation(updated.rgb_equation);
- }
+ if (blend_changed || updated.rgb_equation != current.rgb_equation ||
+ updated.a_equation != current.a_equation) {
+ glBlendEquationSeparate(updated.rgb_equation, updated.a_equation);
}
}
@@ -347,29 +336,17 @@ void OpenGLState::ApplyTargetBlending(std::size_t target, bool force) const {
if (!updated.enabled) {
return;
}
- if (updated.separate_alpha) {
- if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
- updated.dst_rgb_func != current.dst_rgb_func ||
- updated.src_a_func != current.src_a_func || updated.dst_a_func != current.dst_a_func) {
- glBlendFuncSeparateiARB(static_cast<GLuint>(target), updated.src_rgb_func,
- updated.dst_rgb_func, updated.src_a_func, updated.dst_a_func);
- }
-
- if (blend_changed || updated.rgb_equation != current.rgb_equation ||
- updated.a_equation != current.a_equation) {
- glBlendEquationSeparateiARB(static_cast<GLuint>(target), updated.rgb_equation,
- updated.a_equation);
- }
- } else {
- if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
- updated.dst_rgb_func != current.dst_rgb_func) {
- glBlendFunciARB(static_cast<GLuint>(target), updated.src_rgb_func,
- updated.dst_rgb_func);
- }
+ if (blend_changed || updated.src_rgb_func != current.src_rgb_func ||
+ updated.dst_rgb_func != current.dst_rgb_func || updated.src_a_func != current.src_a_func ||
+ updated.dst_a_func != current.dst_a_func) {
+ glBlendFuncSeparateiARB(static_cast<GLuint>(target), updated.src_rgb_func,
+ updated.dst_rgb_func, updated.src_a_func, updated.dst_a_func);
+ }
- if (blend_changed || updated.rgb_equation != current.rgb_equation) {
- glBlendEquationiARB(static_cast<GLuint>(target), updated.rgb_equation);
- }
+ if (blend_changed || updated.rgb_equation != current.rgb_equation ||
+ updated.a_equation != current.a_equation) {
+ glBlendEquationSeparateiARB(static_cast<GLuint>(target), updated.rgb_equation,
+ updated.a_equation);
}
}