Release GPU memory for unused textures

You can release GPU memory for textures that are currently unused for rendering with the ogs command and drt flag. For example, use this command to free texture memory after switching from textured to shaded mode, or templating or hiding objects.

After using this command, you must refresh the current view to release the memory. You can do this by tumbling the viewport or by executing the refresh command three times.

To take advantage of this performance improvement, you must first set the environment variable MAYA_OGS_GPU_FLUSHING_ENABLE = 1.

Tip:

Use also the ogs command gpu flag to verify the total amount of memory used.

Follow these guidelines to release GPU memory:

  1. Run the ogs command with the gpu flag to list the total amount of texture memory used:
    ogs -gpu -dt total
  2. Release GPU memory for unused textures with the drt flag:
    ogs -drt
  3. Tumble the viewport to refresh the active view, or run the refresh command three times as follows:
    refresh -force
  4. Run the ogs command with the gpu flag again to see that texture memory has been released.