[Bf-blender-cvs] [6e56b42faa2] master: Fix T77651: Black screen on Blender startup on ChromeOS

Germano Cavalcante noreply at git.blender.org
Mon Jun 7 20:51:34 CEST 2021


Commit: 6e56b42faa242f3d8b935a07cbb9b5300cebf0a6
Author: Germano Cavalcante
Date:   Mon Jun 7 15:11:50 2021 -0300
Branches: master
https://developer.blender.org/rB6e56b42faa242f3d8b935a07cbb9b5300cebf0a6

Fix T77651: Black screen on Blender startup on ChromeOS

Apparently `textureSize` doesn't work with
`sampler1DArray` on this OS.

Thanks to @dave1853 for finding the source of the
problem.

===================================================================

M	source/blender/blenfont/intern/blf_glyph.c
M	source/blender/gpu/shaders/gpu_shader_text_frag.glsl

===================================================================

diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index f3c5c057dec..2ec0ca22865 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -506,7 +506,7 @@ void blf_glyph_render(FontBLF *font, GlyphCacheBLF *gc, GlyphBLF *g, float x, fl
       if (gc->texture) {
         GPU_texture_free(gc->texture);
       }
-      gc->texture = GPU_texture_create_1d_array(__func__, w, h, 1, GPU_R8, NULL);
+      gc->texture = GPU_texture_create_2d(__func__, w, h, 1, GPU_R8, NULL);
 
       gc->bitmap_len_landed = 0;
     }
diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
index d85884e0a25..2568cd74445 100644
--- a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl
@@ -7,7 +7,7 @@ flat in int interp_size;
 
 out vec4 fragColor;
 
-uniform sampler1DArray glyph;
+uniform sampler2D glyph;
 
 const vec2 offsets4[4] = vec2[4](
     vec2(-0.5, 0.5), vec2(0.5, 0.5), vec2(-0.5, -0.5), vec2(-0.5, -0.5));



More information about the Bf-blender-cvs mailing list