summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJannik Vogel <email@jannikvogel.de>2016-05-01 13:16:46 +0200
committerJannik Vogel <email@jannikvogel.de>2016-05-01 16:35:54 +0200
commit7e0d6903ff8555842d9ab0375daeb6b7e0073432 (patch)
treecd544fbf7a205bdf4f34f58f6f44daed66d9cd2e /src
parentOpenGL: border_color was never set. Fixed. (#1740) (diff)
downloadyuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar.gz
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar.bz2
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar.lz
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar.xz
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.tar.zst
yuzu-7e0d6903ff8555842d9ab0375daeb6b7e0073432.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h41
1 files changed, 11 insertions, 30 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index 8d6177e88..4737e1c52 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -39,36 +39,17 @@ struct PicaShaderConfig {
res.alpha_test_func = regs.output_merger.alpha_test.enable ?
regs.output_merger.alpha_test.func.Value() : Pica::Regs::CompareFunc::Always;
- // Copy relevant TevStageConfig fields only. We're doing this manually (instead of calling
- // the GetTevStages() function) because BitField explicitly disables copies.
-
- res.tev_stages[0].sources_raw = regs.tev_stage0.sources_raw;
- res.tev_stages[1].sources_raw = regs.tev_stage1.sources_raw;
- res.tev_stages[2].sources_raw = regs.tev_stage2.sources_raw;
- res.tev_stages[3].sources_raw = regs.tev_stage3.sources_raw;
- res.tev_stages[4].sources_raw = regs.tev_stage4.sources_raw;
- res.tev_stages[5].sources_raw = regs.tev_stage5.sources_raw;
-
- res.tev_stages[0].modifiers_raw = regs.tev_stage0.modifiers_raw;
- res.tev_stages[1].modifiers_raw = regs.tev_stage1.modifiers_raw;
- res.tev_stages[2].modifiers_raw = regs.tev_stage2.modifiers_raw;
- res.tev_stages[3].modifiers_raw = regs.tev_stage3.modifiers_raw;
- res.tev_stages[4].modifiers_raw = regs.tev_stage4.modifiers_raw;
- res.tev_stages[5].modifiers_raw = regs.tev_stage5.modifiers_raw;
-
- res.tev_stages[0].ops_raw = regs.tev_stage0.ops_raw;
- res.tev_stages[1].ops_raw = regs.tev_stage1.ops_raw;
- res.tev_stages[2].ops_raw = regs.tev_stage2.ops_raw;
- res.tev_stages[3].ops_raw = regs.tev_stage3.ops_raw;
- res.tev_stages[4].ops_raw = regs.tev_stage4.ops_raw;
- res.tev_stages[5].ops_raw = regs.tev_stage5.ops_raw;
-
- res.tev_stages[0].scales_raw = regs.tev_stage0.scales_raw;
- res.tev_stages[1].scales_raw = regs.tev_stage1.scales_raw;
- res.tev_stages[2].scales_raw = regs.tev_stage2.scales_raw;
- res.tev_stages[3].scales_raw = regs.tev_stage3.scales_raw;
- res.tev_stages[4].scales_raw = regs.tev_stage4.scales_raw;
- res.tev_stages[5].scales_raw = regs.tev_stage5.scales_raw;
+ // Copy tev stages
+ const auto& tev_stages = regs.GetTevStages();
+ DEBUG_ASSERT(res.tev_stages.size() == tev_stages.size());
+ for (size_t i = 0; i < tev_stages.size(); i++) {
+ const auto& tev_stage = tev_stages[i];
+ res.tev_stages[i].sources_raw = tev_stage.sources_raw;
+ res.tev_stages[i].modifiers_raw = tev_stage.modifiers_raw;
+ res.tev_stages[i].ops_raw = tev_stage.ops_raw;
+ res.tev_stages[i].const_color = tev_stage.const_color;
+ res.tev_stages[i].scales_raw = tev_stage.scales_raw;
+ }
res.combiner_buffer_input =
regs.tev_combiner_buffer_input.update_mask_rgb.Value() |