gl: Fixes for asahi linux

This commit is contained in:
kd-11 2024-07-31 03:36:08 +03:00 committed by kd-11
parent 7884bcc21d
commit f64c912d02
9 changed files with 43 additions and 6 deletions

View file

@ -271,8 +271,8 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
if (!image_to_flip || aspect_ratio.x1 || aspect_ratio.y1)
{
// Clear the window background to black
gl_state.clear_color(0, 0, 0, 0);
// Clear the window background to opaque black
gl_state.clear_color(0, 0, 0, 255);
gl::screen.clear(gl::buffers::color);
}
@ -302,6 +302,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
const areai screen_area = coordi({}, { static_cast<int>(buffer_width), static_cast<int>(buffer_height) });
const bool use_full_rgb_range_output = g_cfg.video.full_rgb_range_output.get();
const bool backbuffer_has_alpha = m_frame->has_alpha();
if (!m_upscaler || m_output_scaling != g_cfg.video.output_scaling)
{
@ -322,7 +323,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
}
}
if (use_full_rgb_range_output && rsx::fcmp(avconfig.gamma, 1.f) && avconfig.stereo_mode == stereo_render_mode_options::disabled)
if (!backbuffer_has_alpha && use_full_rgb_range_output && rsx::fcmp(avconfig.gamma, 1.f) && avconfig.stereo_mode == stereo_render_mode_options::disabled)
{
// Blit source image to the screen
m_upscaler->scale_output(cmd, image_to_flip, screen_area, aspect_ratio.flipped_vertical(), UPSCALE_AND_COMMIT | UPSCALE_DEFAULT_VIEW);