mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-26 16:58:05 +00:00
renderer_opengl: remove srgb conversion logic
This commit is contained in:
parent
382cf087a0
commit
f05cb69d4f
3 changed files with 2 additions and 9 deletions
|
@ -726,7 +726,6 @@ bool RasterizerOpenGL::AccelerateDisplay(const Tegra::FramebufferConfig& config,
|
||||||
screen_info.texture.width = image_view->size.width;
|
screen_info.texture.width = image_view->size.width;
|
||||||
screen_info.texture.height = image_view->size.height;
|
screen_info.texture.height = image_view->size.height;
|
||||||
screen_info.display_texture = image_view->Handle(Shader::TextureType::Color2D);
|
screen_info.display_texture = image_view->Handle(Shader::TextureType::Color2D);
|
||||||
screen_info.display_srgb = VideoCore::Surface::IsPixelFormatSRGB(image_view->format);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -653,11 +653,7 @@ void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) {
|
||||||
};
|
};
|
||||||
glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices));
|
glNamedBufferSubData(vertex_buffer.handle, 0, sizeof(vertices), std::data(vertices));
|
||||||
|
|
||||||
if (screen_info.display_srgb) {
|
|
||||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
|
||||||
} else {
|
|
||||||
glDisable(GL_FRAMEBUFFER_SRGB);
|
glDisable(GL_FRAMEBUFFER_SRGB);
|
||||||
}
|
|
||||||
glViewportIndexedf(0, 0.0f, 0.0f, static_cast<GLfloat>(layout.width),
|
glViewportIndexedf(0, 0.0f, 0.0f, static_cast<GLfloat>(layout.width),
|
||||||
static_cast<GLfloat>(layout.height));
|
static_cast<GLfloat>(layout.height));
|
||||||
|
|
||||||
|
@ -710,8 +706,7 @@ void RendererOpenGL::RenderScreenshot() {
|
||||||
GLuint renderbuffer;
|
GLuint renderbuffer;
|
||||||
glGenRenderbuffers(1, &renderbuffer);
|
glGenRenderbuffers(1, &renderbuffer);
|
||||||
glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
|
glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer);
|
||||||
glRenderbufferStorage(GL_RENDERBUFFER, screen_info.display_srgb ? GL_SRGB8 : GL_RGB8,
|
glRenderbufferStorage(GL_RENDERBUFFER, GL_SRGB8, layout.width, layout.height);
|
||||||
layout.width, layout.height);
|
|
||||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer);
|
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer);
|
||||||
|
|
||||||
DrawScreen(layout);
|
DrawScreen(layout);
|
||||||
|
|
|
@ -53,7 +53,6 @@ struct TextureInfo {
|
||||||
struct ScreenInfo {
|
struct ScreenInfo {
|
||||||
GLuint display_texture{};
|
GLuint display_texture{};
|
||||||
bool was_accelerated = false;
|
bool was_accelerated = false;
|
||||||
bool display_srgb{};
|
|
||||||
const Common::Rectangle<float> display_texcoords{0.0f, 0.0f, 1.0f, 1.0f};
|
const Common::Rectangle<float> display_texcoords{0.0f, 0.0f, 1.0f, 1.0f};
|
||||||
TextureInfo texture;
|
TextureInfo texture;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue