Uh-oh... sorry for being so late in answering to this thread, but
now I get the following error:
This is before I can even enter into the Preferences panel to change the "Core GL profile".
Note that your assessment of the issue seems to be 100% accurate and correct, at least according to the Khronos community:
https://community.khronos.org/t/glsl-sy ... l/110076/6The logs, of course, are huge to post here, so I'm just adding the few relevant entries:
All right, so, since I can't enter Preferences, I thought — what if this is the kind of preference that
is available via the
user_settings.xml file? All I needed to know, of course, was how it's called. But — ha! No information whatsoever anywhere I searched!
Thankfully, one of the many advantages of open-source software is, well, the ability to read the code. And so I looked for one of the settings that is mentioned on the above-quoted Khronos user community forum:
SDL_GL_CONTEXT_PROFILE_CORE. A quick search showed that this flag is only set once, namely, on line 792 (or so) of
indra/llwindow/llwindowsdl.cpp, after checking if
LLRender::sGLCoreProfile is set to true or not.
LLRender::sGLCoreProfile, in turn, is being assigned the value read from the preferences file in
indra/newview/llappviewer.cpp, from a key named
"RenderGLCoreProfile" — hooray, now I only need to set that key to Boolean 1 (= true) and that was it, Cool VL Viewer launched, and
then I could fiddle with the Preferences again, to great success — now
Help > About... shows the expected string
OpenGL version: 4.1 NVIDIA-16.0.13.
Hooray!
Or... not quite. For some weird reason, once that setting is activated, textures do not load at all. That's actually quite weird, since the viewer behaves "as if" all textures have been properly loaded, in terms of FPS; also, the remaining info about object assets (i.e. their location, rotation, polygonal mesh, etc) is being loaded and placed correctly in-world. Turning on the Texture Console, I get the following display:
https://gyazo.com/245505cfba834a99e8890af815f42d79Note the following weird issues:
- Free VRAM is shown as -1/1024 which looks strange to me. 1024 seems to be a reasonable value for my ancient Nvidia card (it has only 2 GB total).
- Notice how the HTTP and UDP values are both at zero. I assume this means that no requests have been made?
- Textures are in the process of being created (CRE is active) but are all 1x1 and have 0 bytes.
- DDis is correctly set to 0 (highest priority), (Req) is often 0 but sometimes 5; however, Dis is always (-1) for all textures.
- Even so-called "system icons" (look at the inventory!) haven't loaded, although it's certain those are locally stored.
Also note that the above image was taken after waiting several minutes without moving the camera, in the hope that it was just a question of waiting longer.
Afterwards, I noticed that there are not one, but
two parameters regarding the Core GL Profile:
RenderGLCoreProfile and RenderGLContextCoreProfile. The first is the one that is documented on the SL Wiki. The second... also seems to be used... since it appears in the
user_settings.xml for
other viewers. So I turned both on, or off, or alternatively on or off, etc.
With "Core GL profile" unchecked and restarting, the rendering immediately works (in compatibility 2.1 mode, that is!), and produces the following (same location, same camera positioning):
https://gyazo.com/e8315612708c020d9a09729d243a6727Since this area has little traffic and doesn't have many objects in sight (I use it for testing because of that!), all textures were previously cached (either locally on disk or by the HTTP proxy server), which meant that
all of them loaded in about a second (I'm not joking!). This, in fact, is what I
expect to happen under normal conditions, with a static avatar that has been in a certain region for a long time, allowing all textures to be properly cached. And that's exactly what happens when OpenGL is in "compatibility mode" at 2.1.
Now, I wanted to do similar testing on other viewers, and the results are curious. Firestorm (latest stable version, still on the v6 renderer) accepts those two parameters, but it has a nasty tendency to try to overwrite them every time it launches; even with some minor hacks to
force it to accept these settings, Firestorm refuses to do so, and is hard-coded somehow to stick to OpenGL 2.1. I guess it's something the developers decided to do for some good reason (perhaps they had the same issue/bug with textures not loading under OpenGL 4.X on older cards?...). Firestorm does
not crash, nor give an error; it simply refuses to do anything with the settings and remains in compatibility mode.
The official Second Life Viewer, with the new v7 rendering engine, works flawlessly under OpenGL 4.X. While the texture console info display is different from the one in the Cool VL Viewer, this should be a good reference when everything is working as expected:
https://gyazo.com/605d9ef5207214d0381be0b74b020411Note a few things:
- The v7 Official SL Viewer reports more memory to play with, part of which is clearly being used from RAM, not VRAM; I need to tweak those settings at some stage.
- I forgot that I have different camera settings, so the view is not the same. But it's in the general area (I essentially just logged off from Cool VL Viewer and logged in using the Official SL Viewer).
- Only after taking the snapshot I noticed that not all textures had fully rezzed (!), as you can see on some of the trees (they're blurred). Interestingly (or perhaps not!), the Cool VL Viewer is way, way faster in rendering all textures in cache. Mind you, the Official SL Viewer doesn't take "an eternity", it just takes a bit longer — enough for the snapshot still catching the textures being rezzed.
To conclude:
- Enabling Core GL definitely forces the Mac to tell the card to switch to OpenGL 4.1 (in my case), exactly as expected.
- Firestorm, for some reason that only their developers know, refuses to accept these settings (but also doesn't give warnings/errors).
- The v7 renderer from the Official SL Viewer works 100% as expected with OpenGL 4.1.
- Cool VL Viewer accepts the setting for the Core GL enabling, reports that it has successfully activated OpenGL 4.1, and proceeds internally without errors, assuming that "everything" is working "as expected". Object mesh and positioning is being correctly loaded (the frame rate is the same with or without textures, for some strange reason!), but no textures are being loaded, neither the built-in ones, nor those on the disk cache, and not those from the proxy server, either. No warnings/errors are reported on the logs (or, if they are, they weren't obvious to me!).
My guess is that this cannot be something very hard to figure out, and perhaps it doesn't even need any code — it could be just an option that I should turn on or off somewhere. Who knows, perhaps by default, when switching Enable Core GL on, it turns off the setting for enabling textures
More likely, I think, is the way VRAM and RAM are being set up/calculated — this might be differently interpreted under OpenGL 2.1 (where the calculations are correct) and OpenGL 4.X, where the current settings I've got don't make sense or give contradictory results or whatever — preventing Cool VL Viewer from knowing how much VRAM is
really available for textures, and finding none (thus the -1 value...).
For the sake of the argument, here is what my settings show:
https://gyazo.com/7aba15965305cca7a6137ac110f424d2Note that I'm attempting to force values (and I even tried to set
DisableVRAMCheck to TRUE, just in case...) in the hope of getting more predictable VRAM calculations, but either everything I put there is wrong, or it's irrelevant for this case.
And here is the log, searching by the keyword "texture":
| | |
| Code: 2024-04-05 12:44:28Z INFO: LLTextureCache::LLTextureCache: Initializing with 2 worker threads... 2024-04-05 12:44:28Z INFO: LLThreadPool::run: Starting thread: ThreadPool:Texture cache:1/2 2024-04-05 12:44:28Z INFO: LLThreadPool::run: Starting thread: ThreadPool:Texture cache:2/2 2024-04-05 12:44:28Z INFO: LLThread::threadRun: Running thread Texture fetch with Id: 0x700009357000 2024-04-05 12:44:29Z INFO: LLTextureCache::initCache: Headers: 1048576 Textures size: 3603 MB 2024-04-05 12:44:29Z INFO: LLGLManager::initGL: Estimating usable VRAM for textures based on reported total VRAM (this is inaccurate): 1024 MB. 2024-04-05 12:44:29Z WARNING: LLViewerTextureList::getMaxVideoRamSetting: Overriding the detected VRAM amount with the VRAMOverride debug settings: 1024MB of VRAM assumed. 2024-04-05 12:44:29Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Recommended max texture RAM: 1536 MB - System RAM: 16384 MB. 2024-04-05 12:44:29Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Usable texture RAM: 1536 MB -System RAM: 16384 MB. 2024-04-05 12:44:29Z INFO: LLViewerTextureList::updateMaxResidentTexMem: Total usable VRAM: 1024 MB - Usable frame buffers VRAM: 256 MB - Usable texture VRAM: 768 MB - Maximum total texture memory set to: 1536 MB - Maximum total GL bound texture memory set to: 768 MB 2024-04-05 12:44:29Z INFO: LLViewerTextureList::init: Preloading images (any crash would be the result of a missing image file)... 2024-04-05 12:44:29Z INFO: LLViewerTextureList::init: Images preloading successful. 2024-04-05 12:44:30Z INFO: LLViewerShaderMgr::setShaders: Using up to 16 texture index channels. 2024-04-05 12:44:30Z INFO: LLGLSLShader::createShader: Creating shader: Splat texture rect shader - Level: 2 - File: interface/splattexturerectV.glsl 2024-04-05 12:44:30Z INFO: LLGLSLShader::createShader: Creating shader: Splat texture rect shader - Level: 2 - File: interface/splattexturerectF.glsl 2024-04-05 12:44:30Z INFO: LLGLSLShader::createShader: Creating shader: One texture no color shader - Level: 2 - File: interface/onetexturenocolorV.glsl 2024-04-05 12:44:30Z INFO: LLGLSLShader::createShader: Creating shader: One texture no color shader - Level: 2 - File: interface/onetexturenocolorF.glsl 2024-04-05 12:44:35Z INFO: LLUserAuth::authenticate: Options: inventory-root, inventory-skeleton, inventory-lib-root, inventory-lib-owner, inventory-skel-lib, agent_appearance_service, initial-outfit, gestures, event_categories, event_notifications, classified_categories, adult_compliant, buddy-list, ui-config, max_groups, max-agent-groups, map-server-url, search-server-url, login-flags, global-textures, account_level_benefits, END 2024-04-05 12:44:39Z INFO: get_S32_value: - texture_upload_cost: 10 2024-04-05 12:44:51Z INFO: LLViewerStats::sendStats: Misc stats: string_1: - string_2: Texture Time: 23.82, Total Time: 13.33 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: head-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: upper-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: lower-baked UUID: 6a02a7a3-dcd2-2c36-8180-808080800023 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: eyes-baked UUID: 6a02a7a3-dcd2-2c36-8180-808080800023 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: skirt-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: hair-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: leftarm-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: leftleg-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: aux1-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: aux2-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:44:52Z INFO: LLVOAvatarSelf::setNewBakedTexture: New baked texture: aux3-baked UUID: 1d010000-76bf-1429-475f-d1228a32b527 2024-04-05 12:45:08Z WARNING: LLTextureFetchWorker::onCompleted: Texture: 634bcfcb-d6ba-0a95-3943-c1e88a08b1b0 CURL GET FAILED, status: Http_404 - reason: Not Found 2024-04-05 12:45:21Z WARNING: LLTextureFetchWorker::doWork: Texture 634bcfcb-d6ba-0a95-3943-c1e88a08b1b0: failed harder 2024-04-05 12:45:21Z WARNING: LLViewerTexture::updateFetch: No data received for image 634bcfcb-d6ba-0a95-3943-c1e88a08b1b0, setting as missing. decode_priority = 1.2317e+07 - mRawDiscardLevel = 32767 - current_discard = -1 2024-04-05 12:45:21Z WARNING: LLViewerTexture::setIsMissingAsset: 634bcfcb-d6ba-0a95-3943-c1e88a08b1b0: Marking image as missing 2024-04-05 12:49:41Z INFO: LLViewerStats::sendStats: Misc stats: string_1: - string_2: Texture Time: 313.70, Total Time: 313.34
| |
| | |
Logs searching for "RAM":
Oh — I almost forgot!
When OpenGL 4.1 is being "forced", the built-in Web browser
also stops working! I just noticed that because the splash screen doesn't load (but I assumed it was just being stubborn and loading slowly). Back in compatibility mode, the LL splash screen appears instantly. Launching the built-in viewer in OpenGL 4.1 results simply in a black background. No errors — it says "loading", then simply assumes that everything has been loaded and has been displayed — but nothing was actually done. It remains a black screen (exactly like the splash screen on start).
Here are the logs when trying to use the built-in browser to connect to
https://status.secondlifegrid.net/:
The only weird thing there is the empty MIME type, but since I generally don't pay attention to those things, my best guess is that this is actually what happens with all requests... there was no error on the logs, though.
Sorry for the long post. Please let me know if I can send you more data that might be pertinent to further debug this issue!