Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-06-07 21:11:50 +0300
committerJeroen Bakker <jeroen@blender.org>2021-06-09 14:01:41 +0300
commita925c8969d706cb3c0768a9fa88151b1ad67a923 (patch)
tree80357d00001903caf2622449c33ed1cc485e2a5f
parent531e4fcf3ef5b9ab3cd3a04f2d8a24d967abfce5 (diff)
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.
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c3
-rw-r--r--source/blender/gpu/shaders/gpu_shader_text_frag.glsl2
2 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index a38cb323777..42c0bb1e488 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -480,8 +480,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_nD(
- w, h, 0, 1, NULL, GPU_R8, GPU_DATA_UNSIGNED_BYTE, 0, false, NULL);
+ gc->texture = GPU_texture_create_2d(w, h, GPU_R8, NULL, 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 cc12e3f78a5..b993cfb6463 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));