mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
This commit is contained in:
		
							parent
							
								
									91602de7f2
								
							
						
					
					
						commit
						ee7c2dbf5a
					
				@ -136,7 +136,7 @@ struct Values {
 | 
			
		||||
    float resolution_factor;
 | 
			
		||||
    bool use_frame_limit;
 | 
			
		||||
    u16 frame_limit;
 | 
			
		||||
    bool use_accurate_framebuffers;
 | 
			
		||||
    bool use_accurate_gpu_emulation;
 | 
			
		||||
 | 
			
		||||
    float bg_red;
 | 
			
		||||
    float bg_green;
 | 
			
		||||
 | 
			
		||||
@ -163,8 +163,8 @@ TelemetrySession::TelemetrySession() {
 | 
			
		||||
    AddField(Telemetry::FieldType::UserConfig, "Renderer_UseFrameLimit",
 | 
			
		||||
             Settings::values.use_frame_limit);
 | 
			
		||||
    AddField(Telemetry::FieldType::UserConfig, "Renderer_FrameLimit", Settings::values.frame_limit);
 | 
			
		||||
    AddField(Telemetry::FieldType::UserConfig, "Renderer_UseAccurateFramebuffers",
 | 
			
		||||
             Settings::values.use_accurate_framebuffers);
 | 
			
		||||
    AddField(Telemetry::FieldType::UserConfig, "Renderer_UseAccurateGpuEmulation",
 | 
			
		||||
             Settings::values.use_accurate_gpu_emulation);
 | 
			
		||||
    AddField(Telemetry::FieldType::UserConfig, "System_UseDockedMode",
 | 
			
		||||
             Settings::values.use_docked_mode);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -119,8 +119,8 @@ protected:
 | 
			
		||||
        auto& rasterizer = Core::System::GetInstance().Renderer().Rasterizer();
 | 
			
		||||
        rasterizer.UpdatePagesCachedCount(object->GetAddr(), object->GetSizeInBytes(), -1);
 | 
			
		||||
 | 
			
		||||
        // Only flush if use_accurate_framebuffers is enabled, as it incurs a performance hit
 | 
			
		||||
        if (Settings::values.use_accurate_framebuffers) {
 | 
			
		||||
        // Only flush if use_accurate_gpu_emulation is enabled, as it incurs a performance hit
 | 
			
		||||
        if (Settings::values.use_accurate_gpu_emulation) {
 | 
			
		||||
            FlushObject(object);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -638,8 +638,8 @@ void RasterizerOpenGL::FlushAll() {}
 | 
			
		||||
void RasterizerOpenGL::FlushRegion(VAddr addr, u64 size) {
 | 
			
		||||
    MICROPROFILE_SCOPE(OpenGL_CacheManagement);
 | 
			
		||||
 | 
			
		||||
    if (Settings::values.use_accurate_framebuffers) {
 | 
			
		||||
        // Only flush if use_accurate_framebuffers is enabled, as it incurs a performance hit
 | 
			
		||||
    if (Settings::values.use_accurate_gpu_emulation) {
 | 
			
		||||
        // Only flush if use_accurate_gpu_emulation is enabled, as it incurs a performance hit
 | 
			
		||||
        res_cache.FlushRegion(addr, size);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1197,11 +1197,11 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface,
 | 
			
		||||
 | 
			
		||||
    // If the format is the same, just do a framebuffer blit. This is significantly faster than
 | 
			
		||||
    // using PBOs. The is also likely less accurate, as textures will be converted rather than
 | 
			
		||||
    // reinterpreted. When use_accurate_framebuffers setting is enabled, perform a more accurate
 | 
			
		||||
    // reinterpreted. When use_accurate_gpu_emulation setting is enabled, perform a more accurate
 | 
			
		||||
    // surface copy, where pixels are reinterpreted as a new format (without conversion). This
 | 
			
		||||
    // code path uses OpenGL PBOs and is quite slow.
 | 
			
		||||
    const bool is_blit{old_params.pixel_format == new_params.pixel_format ||
 | 
			
		||||
                       !Settings::values.use_accurate_framebuffers};
 | 
			
		||||
                       !Settings::values.use_accurate_gpu_emulation};
 | 
			
		||||
 | 
			
		||||
    switch (new_params.target) {
 | 
			
		||||
    case SurfaceParams::SurfaceTarget::Texture2D:
 | 
			
		||||
 | 
			
		||||
@ -85,8 +85,8 @@ void Config::ReadValues() {
 | 
			
		||||
    Settings::values.resolution_factor = qt_config->value("resolution_factor", 1.0).toFloat();
 | 
			
		||||
    Settings::values.use_frame_limit = qt_config->value("use_frame_limit", true).toBool();
 | 
			
		||||
    Settings::values.frame_limit = qt_config->value("frame_limit", 100).toInt();
 | 
			
		||||
    Settings::values.use_accurate_framebuffers =
 | 
			
		||||
        qt_config->value("use_accurate_framebuffers", false).toBool();
 | 
			
		||||
    Settings::values.use_accurate_gpu_emulation =
 | 
			
		||||
        qt_config->value("use_accurate_gpu_emulation", false).toBool();
 | 
			
		||||
 | 
			
		||||
    Settings::values.bg_red = qt_config->value("bg_red", 0.0).toFloat();
 | 
			
		||||
    Settings::values.bg_green = qt_config->value("bg_green", 0.0).toFloat();
 | 
			
		||||
@ -233,7 +233,7 @@ void Config::SaveValues() {
 | 
			
		||||
    qt_config->setValue("resolution_factor", (double)Settings::values.resolution_factor);
 | 
			
		||||
    qt_config->setValue("use_frame_limit", Settings::values.use_frame_limit);
 | 
			
		||||
    qt_config->setValue("frame_limit", Settings::values.frame_limit);
 | 
			
		||||
    qt_config->setValue("use_accurate_framebuffers", Settings::values.use_accurate_framebuffers);
 | 
			
		||||
    qt_config->setValue("use_accurate_gpu_emulation", Settings::values.use_accurate_gpu_emulation);
 | 
			
		||||
 | 
			
		||||
    // Cast to double because Qt's written float values are not human-readable
 | 
			
		||||
    qt_config->setValue("bg_red", (double)Settings::values.bg_red);
 | 
			
		||||
 | 
			
		||||
@ -75,7 +75,7 @@ void ConfigureGraphics::setConfiguration() {
 | 
			
		||||
        static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor)));
 | 
			
		||||
    ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit);
 | 
			
		||||
    ui->frame_limit->setValue(Settings::values.frame_limit);
 | 
			
		||||
    ui->use_accurate_framebuffers->setChecked(Settings::values.use_accurate_framebuffers);
 | 
			
		||||
    ui->use_accurate_gpu_emulation->setChecked(Settings::values.use_accurate_gpu_emulation);
 | 
			
		||||
    bg_color = QColor::fromRgbF(Settings::values.bg_red, Settings::values.bg_green,
 | 
			
		||||
                                Settings::values.bg_blue);
 | 
			
		||||
    ui->bg_button->setStyleSheet(
 | 
			
		||||
@ -87,7 +87,7 @@ void ConfigureGraphics::applyConfiguration() {
 | 
			
		||||
        ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex()));
 | 
			
		||||
    Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked();
 | 
			
		||||
    Settings::values.frame_limit = ui->frame_limit->value();
 | 
			
		||||
    Settings::values.use_accurate_framebuffers = ui->use_accurate_framebuffers->isChecked();
 | 
			
		||||
    Settings::values.use_accurate_gpu_emulation = ui->use_accurate_gpu_emulation->isChecked();
 | 
			
		||||
    Settings::values.bg_red = static_cast<float>(bg_color.redF());
 | 
			
		||||
    Settings::values.bg_green = static_cast<float>(bg_color.greenF());
 | 
			
		||||
    Settings::values.bg_blue = static_cast<float>(bg_color.blueF());
 | 
			
		||||
 | 
			
		||||
@ -50,9 +50,9 @@
 | 
			
		||||
          </layout>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QCheckBox" name="use_accurate_framebuffers">
 | 
			
		||||
         <widget class="QCheckBox" name="use_accurate_gpu_emulation">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>Use accurate framebuffers (slow)</string>
 | 
			
		||||
           <string>Use accurate GPU emulation (slow)</string>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
 | 
			
		||||
@ -99,8 +99,8 @@ void Config::ReadValues() {
 | 
			
		||||
    Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
 | 
			
		||||
    Settings::values.frame_limit =
 | 
			
		||||
        static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
 | 
			
		||||
    Settings::values.use_accurate_framebuffers =
 | 
			
		||||
        sdl2_config->GetBoolean("Renderer", "use_accurate_framebuffers", false);
 | 
			
		||||
    Settings::values.use_accurate_gpu_emulation =
 | 
			
		||||
        sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false);
 | 
			
		||||
 | 
			
		||||
    Settings::values.bg_red = (float)sdl2_config->GetReal("Renderer", "bg_red", 0.0);
 | 
			
		||||
    Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0);
 | 
			
		||||
 | 
			
		||||
@ -110,9 +110,9 @@ use_frame_limit =
 | 
			
		||||
# 1 - 9999: Speed limit as a percentage of target game speed. 100 (default)
 | 
			
		||||
frame_limit =
 | 
			
		||||
 | 
			
		||||
# Whether to use accurate framebuffers
 | 
			
		||||
# Whether to use accurate GPU emulation
 | 
			
		||||
# 0 (default): Off (fast), 1 : On (slow)
 | 
			
		||||
use_accurate_framebuffers =
 | 
			
		||||
use_accurate_gpu_emulation =
 | 
			
		||||
 | 
			
		||||
# The clear color for the renderer. What shows up on the sides of the bottom screen.
 | 
			
		||||
# Must be in range of 0.0-1.0. Defaults to 1.0 for all.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user