Failed to allocate DeviceMemory and Crash #1072
-
Beta Was this translation helpful? Give feedback.
Answered by
robertosfield
Jan 16, 2024
Replies: 2 comments 6 replies
-
How did you convert the file from .osgb to .vsgb? I presume osg2vsg. How big is the .osgb? What type of model is it? As a general note, osg2vsg was written early during the development of the VulkanSceneGraph and needs to be rewritten to use modern VSG functionality. I would like to see this happen early this year. A rewrite might not address memory issues for your particular model. |
Beta Was this translation helpful? Give feedback.
5 replies
-
Hi Robert,
Regarding your comment about using PagedLOD, I'm assuming that there is no
way of doing this automatically when you're loading an existing model and
you would have to break it up manually (or write some code to do it).
Cheers,
Roland
…On Tue, 16 Jan 2024 at 20:54, Robert Osfield ***@***.***> wrote:
The number of elements is probably not the cause of high memory usage but
the amount of geometry and texture data associated with them.
The main change I'm wanting to see in osg2vsg is utilize the
vsg::ShaderSet/GeometryPipelineConfigurator scheme that will open the door
for extensible shader setup as well all the lighting and shadow map
functionality that the VSG's standard PBR and Phong ShaderSet provide.
These changes will mainly help for visual quality rather than lower memory
footprint.
My best guess at this point is the VSG is trying to allocate all the
vertex and texture data resident in GPU memory and it's running out on your
Quadro. Vulkan allows to specify exactly where the memory you want to
allocate will be allocated from, in the case of vertex and texture data the
VSG is choosing to allocate that in GPU memory, but one possibility would
be to have the VSG use hints to decide what classes of memory to allocate
where, so perhaps for your model type allocating the vertex data on the CPU
but visible to the GPU would be the solution.
In the case of OpenGL the application has less control over where memory
is held during rendering, and the driver can decide to move data around if
it's running out on GPU local memory. This doesn't happen with Vulkan as
the responsibility is down to the application, or scene graph.
In the short term it may be possible to pack the vertex or texture data in
a more compact form to fit within the constraints of the GPU memory - for
instance compressed texture.
For really big models I would also recommend using PagedLOD, this applies
the same to OSG and VSG, they both have similar functionality for managing
paged databases. The advantage of paged databases is that the model size
can scale to terabyte size but still run at 60fps on modest hardware.
—
Reply to this email directly, view it on GitHub
<#1072 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPOEQ5MFXLZBVY5WLEHVUDYOZE3TAVCNFSM6AAAAABB4IOFHCVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DCNBSGE3TI>
.
You are receiving this because you are subscribed to this thread.Message
ID: <vsg-dev/VulkanSceneGraph/repo-discussions/1072/comments/8142174@
github.com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The number of elements is probably not the cause of high memory usage but the amount of geometry and texture data associated with them.
The main change I'm wanting to see in osg2vsg is utilize the vsg::ShaderSet/GeometryPipelineConfigurator scheme that will open the door for extensible shader setup as well all the lighting and shadow map functionality that the VSG's standard PBR and Phong ShaderSet provide. These changes will mainly help for visual quality rather than lower memory footprint.
My best guess at this point is the VSG is trying to allocate all the vertex and texture data resident in GPU memory and it's running out on your Quadro. Vulkan allows to specify exactly where the memo…