[gtk/wip/matthiasc/gsk-hdr] ngl: Make render_texture high depth aware
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/gsk-hdr] ngl: Make render_texture high depth aware
- Date: Wed, 6 Oct 2021 22:32:09 +0000 (UTC)
commit a447d6323d72160bf0f8e5ae7bf96ea9710ce274
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 6 18:31:09 2021 -0400
ngl: Make render_texture high depth aware
Make a deep texture, if the render nodes have
high depth content.
gsk/ngl/gsknglrenderer.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gsk/ngl/gsknglrenderer.c b/gsk/ngl/gsknglrenderer.c
index e5aaebd0a4..c75d82230e 100644
--- a/gsk/ngl/gsknglrenderer.c
+++ b/gsk/ngl/gsknglrenderer.c
@@ -241,6 +241,7 @@ gsk_ngl_renderer_render_texture (GskRenderer *renderer,
guint texture_id;
int width;
int height;
+ int format;
g_assert (GSK_IS_NGL_RENDERER (renderer));
g_assert (root != NULL);
@@ -248,9 +249,11 @@ gsk_ngl_renderer_render_texture (GskRenderer *renderer,
width = ceilf (viewport->size.width);
height = ceilf (viewport->size.height);
+ format = gsk_render_node_prefers_high_depth (root) ? GL_RGBA16F : GL_RGBA8;
+
if (gsk_ngl_driver_create_render_target (self->driver,
width, height,
- GL_RGBA8,
+ format,
GL_NEAREST, GL_NEAREST,
&render_target))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]