Closed dmitshur closed 3 years ago
Note that this happens even with the default font face and other settings:
I found that the same bug was described in https://discord.com/channels/280102180189634562/280157083356233728/780817991159382077.
A workaround that was suggested there is to force "hardware_acceleration": "none"
. I can confirm the issue no longer happens after that setting is applied and ST4 is restarted.
I was also experiencing this text rendering bug with build 4094 on MacBook Pro (M1). Confirm turning off hardware acceleration resolves issue.
Turning off hardware acceleration does make the flickering stop, but the performance is noticeably (and unsurprisingly) poor.
As far as I know ST doesn't have an FPS meter so I can only guess, but I think it'd be lucky to be getting >20 FPS while scrolling on this specced-out M1 MacBook Pro. At those speeds, suddenly other editors are looking more tempting.
Are there any plans to revisit this? I seem to remember seeing talk of a Metal rendering backend somewhere
Can someone test and see how the results are on build 4092? I don't have an M1 Mac, but there were some tweaks between 4092 and 4093 and I'm curious if they affected things for users with an M1.
@wbond I tried build 4092 on an M1 Mac (with macOS 11.1) just now, and I can confirm it has the same problem as reported in the original issue that I'm also seeing in the latest build, 4094.
@dmitshur Thanks for checking so quickly! Would you mind trying 4086 also?
No problem. I've tested build 4086 and can confirm the issue does not reproduce in it.
If it would help, I'm happy to test the builds in between to bisect this further.
Excellent, at least I know the likely cause! That should help identify a word-around.
Do you see any performance issues running 4086? Specifically looking at the FPS when scrolling a large, maximized window via the scroll bar would be a useful data point.
Do you see any performance issues running 4086?
Short answer, no performance issues.
Longer answer. I tried at 2560x1600 (13" Retina) only so far, maximized window. Unless there's some way to display an FPS counter, the best I can tell with my eyes is to categorize performance into two categories: "fast" (45±15 FPS) and "slow" (20±10 FPS). With hardware_acceleration
set to opengl
in build 4086, performance is in the fast category. This is the same category where I'd place ST3 with its gpu_window_buffer
set to the default auto
. With hardware_acceleration
set to none
, performance is in the slow category (also see https://github.com/sublimehq/sublime_text/issues/3794#issuecomment-742512644 above).
In the console you can execute: sublime.log_fps(True)
.
Can someone with an M1 post their OpenGL debug info from the Sublime Text console?
Thanks for the log FPS command suggestion. I'm seeing numbers around 120 FPS maximum when scrolling a full-screen window at 2560x1600 with hardware_acceleration
set to opengl
:
fps: 117.8 average: 2ms
fps: 117.6 average: 2ms
fps: 118.2 average: 2ms
fps: 115.8 average: 2ms
fps: 115.6 average: 3ms
fps: 119 average: 2ms
fps: 118.8 average: 2ms
fps: 116.8 average: 2ms
(It's about the same with builds 4094 and 4086.)
With hardware_acceleration
set to none
, it seems to say around 30 FPS but with many other messages in between:
By "OpenGL debug info" are you referring to https://www.sublimetext.com/docs/gpu_rendering.html#diagnostics:ver-dev? If so, here:
OpenGL Context Information:
GL API Version: 4.1 Metal - 71.0.7
GLSL Version: 4.10
Vendor: Apple
Renderer: Apple M1
If there's more I can do to help, please let me know.
I think it's worth noting that it's not only the editor but also the minimap that has issues with this. Should look like this:
But sometimes looks like this:
MacBook Pro M1 & Sublime Text 4094
EDIT: Oh and i just noticed that the issues are there even with "hardware_acceleration": "none"
Fixed in build 4095.
Description
There's some sort of issue with text rendering with this version of Sublime Text on an MacBook Air with an Apple M1 chip. It doesn't happen with a stable build of Sublime Text 3 on the same computer.
Steps to reproduce
Expected behavior
Normal text rendering behavior at all times, as in Sublime Text 3.
Screenshot
![image](https://user-images.githubusercontent.com/1924134/100493367-35f7e200-3104-11eb-9445-95c3e8126681.png)Actual behavior
Text rendering appears broken some of the time or most of the time. Starting around middle of the screen, most characters become invisible. As you scroll or move mouse or switch between tabs or windows, it sometimes flickers to rendering okay temporarily.
Environment