[gtk/wip/matthiasc/gsk-hdr: 5/5] 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: 5/5] ngl: Make render_texture high depth aware
- Date: Thu, 7 Oct 2021 01:35:35 +0000 (UTC)
commit 566a2e6136038424ec5a41a1af9bfe4e374be4fd
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]