[gtk/wip/otte/glcontext: 2/7] ngl: Compute correct renderformat




commit 3b9967db48e795faf9b1071e2b0e662fbb550f36
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 8 02:31:25 2021 +0200

    ngl: Compute correct renderformat
    
    We want to round up, not down.

 gsk/ngl/gsknglrenderjob.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c
index ace2ffcf0d..27be7ca004 100644
--- a/gsk/ngl/gsknglrenderjob.c
+++ b/gsk/ngl/gsknglrenderjob.c
@@ -4076,9 +4076,9 @@ get_framebuffer_format (guint framebuffer)
                                                      : GL_BACK,
                                          GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
 
-  if (size >= 32)
+  if (size > 16)
     return GL_RGBA32F;
-  else if (size >= 16)
+  else if (size > 8)
     return GL_RGBA16F;
   else
     return GL_RGBA8;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]