video_core: receive hardware shader settings

This commit is contained in:
wwylele 2018-05-13 10:47:06 +03:00
parent f1cc8cfea9
commit 06815ec905
4 changed files with 11 additions and 2 deletions

View File

@ -22,6 +22,9 @@ void Apply() {
VideoCore::g_hw_renderer_enabled = values.use_hw_renderer;
VideoCore::g_shader_jit_enabled = values.use_shader_jit;
VideoCore::g_hw_shader_enabled = values.use_hw_shader;
VideoCore::g_hw_shader_accurate_gs = values.shaders_accurate_gs;
VideoCore::g_hw_shader_accurate_mul = values.shaders_accurate_mul;
if (VideoCore::g_emu_window) {
auto layout = VideoCore::g_emu_window->GetFramebufferLayout();

View File

@ -18,6 +18,7 @@
#include "video_core/renderer_opengl/gl_shader_decompiler.h"
#include "video_core/renderer_opengl/gl_shader_gen.h"
#include "video_core/renderer_opengl/gl_shader_util.h"
#include "video_core/video_core.h"
using Pica::FramebufferRegs;
using Pica::LightingRegs;
@ -226,7 +227,7 @@ void PicaShaderConfigCommon::Init(const Pica::ShaderRegs& regs, Pica::Shader::Sh
program_hash = setup.GetProgramCodeHash();
swizzle_hash = setup.GetSwizzleDataHash();
main_offset = regs.main_offset;
sanitize_mul = false; // TODO (wwylele): stubbed now. Should sync with user settings
sanitize_mul = VideoCore::g_hw_shader_accurate_mul;
num_outputs = 0;
output_map.fill(16);

View File

@ -19,7 +19,9 @@ std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
std::atomic<bool> g_hw_renderer_enabled;
std::atomic<bool> g_shader_jit_enabled;
std::atomic<bool> g_vsync_enabled;
std::atomic<bool> g_hw_shader_enabled;
std::atomic<bool> g_hw_shader_accurate_gs;
std::atomic<bool> g_hw_shader_accurate_mul;
/// Initialize the video core
bool Init(EmuWindow* emu_window) {

View File

@ -22,6 +22,9 @@ extern EmuWindow* g_emu_window; ///< Emu window
// qt ui)
extern std::atomic<bool> g_hw_renderer_enabled;
extern std::atomic<bool> g_shader_jit_enabled;
extern std::atomic<bool> g_hw_shader_enabled;
extern std::atomic<bool> g_hw_shader_accurate_gs;
extern std::atomic<bool> g_hw_shader_accurate_mul;
/// Start the video core
void Start();