Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-18 15:07:19



Reply to topic  [ 8 posts ] 
Issue with Texture Memory slider? 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
I have just installed a video card with 11Gb of memory. The viewer seems to detect that properly as demonstrated by:
Code:
2018-08-21T23:35:23Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Available texture memory: 11264 MB - System RAM: 16064 MB.
2018-08-21T23:35:23Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Applied recommended max texture memory clamping to: 8032 MB
2018-08-21T23:35:23Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Available texture memory: 22528 MB - System RAM: 16064 MB.
2018-08-21T23:35:23Z INFO: LLViewerTextureList::getMaxVideoRamSetting: Applied max texture memory clamping to: 16064 MB
I know the recommendation is to only use at most half of this 11Gb but since it seems to be capped at 8Gb, I moved the slider all the way to the right. This results in:
Code:
2018-08-21T23:35:23Z INFO: LLViewerTextureList::updateMaxResidentTexMem: Total Video Memory set to: 8032 MB
2018-08-21T23:35:23Z INFO: LLViewerTextureList::updateMaxResidentTexMem: Available Texture Memory set to: 6024 MB
Now when I return to the config option the slider is set to 4096 (half of my clamped max). However, this seems to disagree with the Debug Setting: TextureMemory, which does show 8032. Given the differing values, I'm not really sure which value is correct here. I'm possibly in the minority which use Cool VL Viewer and have a card with this much memory. Might there be a bug in how the Debug Setting and the Preferences UI differ? Would the recommendation just be to put my configuration at 4096? Cheers.


2018-08-21 23:52:12
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
This is not a bug, although the log messages are misleading and have been changed for next release to be clearer.

The first time getMaxVideoRamSetting() is called, it is with a flag telling it to return the recommended maximums, while the second time, it returns the adopted maximums.

Your problem here, is that your system RAM is insufficient for the viewer to exploit the 11Gb of VRAM your graphics card got !
Bear in mind that the viewer needs much more texture RAM than it needs VRAM; for a start, each texture is stored in both its compressed/encoded (j2c usually, but maybe png, tga, jpg, bmp too) and "raw" formats, as well as a scaled texture (depending on the texture LOD), then there are also OpenGL "bound" textures, etc.
You would need 32Gb of RAM for the viewer to be able to use 10+ GB of texture VRAM. Finally, you cannot use all the VRAM for textures: the viewer also needs frame buffers, vertex buffers, etc...

So, in your case, the viewer properly clamps the texture RAM to 8Gb (half your RAM), which roughly translates in 4Gb VRAM (this latter limit is not a "hard" one, and the actual amount of VRAM used will vary without control by the viewer that only caps the associated RAM usage to avoid going too far; the actual VRAM amount used depends heavily on your graphics card architecture and its driver implementation).

EDIT: I also clamped the frame buffers total size estimation to 512Mb (instead of just VRAM/4) for next release, which should prove more than enough (even for 8K screens) and will allow more VRAM to be used for textures in 4Gb+ video cards...


2018-08-22 08:44:41
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Ah, thanks for the information and looking at this. It's sad that my system RAM isn't sufficient to use the VRAM to its fullest. Maybe time to upgrade RAM as well. :?

So does the Preferences UI slider reflect what the viewer determines it will use vs the value saved in TextureMemory? It just seems odd that the slider (for me) has a max of 8032 (half my RAM) but no matter what I slide it too (> 4096), upon looking at that setting again it is right in the middle at 4096 but the value stored in TextureMemory can be higher.


2018-08-22 13:55:36
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
ZaneZimer wrote:
So does the Preferences UI slider reflect what the viewer determines it will use vs the value saved in TextureMemory? It just seems odd that the slider (for me) has a max of 8032 (half my RAM) but no matter what I slide it too (> 4096), upon looking at that setting again it is right in the middle at 4096 but the value stored in TextureMemory can be higher.
I already explained that in my post above. Texture RAM clamped to half your system RAM, which translates into the preferences to 4Gb of VRAM for textures (5.5Gb for next release, thanks to the frame buffers amount clamping I added to it).


2018-08-22 14:09:34
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Henri Beauchamp wrote:
I already explained that in my post above. Texture RAM clamped to half your system RAM, which translates into the preferences to 4Gb of VRAM for textures (5.5Gb for next release, thanks to the frame buffers amount clamping I added to it).
Sorry about not understanding. It's a bit early here for me and my coffee hasn't kicked in.


2018-08-22 14:36:20
Profile

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Thanks for making that change, Henri. I have verified the log message has changed and I believe I am getting the max I'm capable of now (I upgraded system RAM to 32Gb).

I think I found the 'cause' of what I am seeing regarding the settings slider though. The skin file panel_preferences_graphics.xml has a max of 4096 as seen here:
Code:
431                         <slider name="GrapicsCardTextureMemory" control_name="TextureMemory"
432                          can_edit_text="false" decimal_digits="0" min_val="0" max_val="4096" increment="16"
433                          label_width="135" label="Texture memory (MB):"
So while I could slide it higher and have TextureMemory change and get stored, upon returning to the Preferences UI, that slider would be maxed out at 4096. I have created an override copy of the skin file and placed in my .secondlife/skins folders. This will allow me to see the proper value when I return to look at that setting.


2018-08-27 23:36:03
Profile

Joined: 2009-03-17 18:42:51
Posts: 5545
Reply with quote
These slider maximum and minimum values are already set from the code, so what you see in the xml file is just a default value that *will* get overridden anyway. Your xml override should therefore make strictly no difference and you can remove it now that the code got changed.

EDIT: in fact, you are right, there is apparently a race condition in the UI code causing the texture memory setting to be capped to the default slider max value while the latter value gets properly set to the detected actual maximum... I'll fix that for next release.


2018-08-28 07:47:47
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 342
Location: Columbus area, OH, USA
Reply with quote
Henri Beauchamp wrote:
EDIT: in fact, you are right, there is apparently a race condition in the UI code causing the texture memory setting to be capped to the default slider max value while the latter value gets properly set to the detected actual maximum... I'll fix that for next release.
It's nice that you found that because I didn't really like what felt like just a hack to change the value in the skin file.


2018-08-28 12:57:25
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.