Comments (11)
Please build and then run the sdkmeshdump.cpp tool on your sdkmesh
and post the results here so I can get a sense of the size of resources you need.
from directxtk12.
Here's what I got back for the model I'm having issues with.
from directxtk12.
Also, are you calling GraphicsMemory::Commit
each rendering frame? It's critical for the memory reclamation.
from directxtk12.
Yeah, I call it at the end of every render. I'm also utilising GraphicsMemory::GarbageCollect
in-between loading models to try and help, but it doesn't seem to make much difference.
from directxtk12.
I'm calling DeviceResources::WaitForGpu
before GraphicsMemory::GarbageCollect
as the function states the GPU must be idled before using for best effects - is this correct?
from directxtk12.
I think the question is what is your overall memory usage. The LinearAllocator used by GraphicsMemory grows the heap on-demand so it's not a fixed size. That said, it can't grow the heap larger than the amount of memory that your DirectX 12 driver supports for UPLOAD
type heaps.
Are you loading a lot of models? Are you using LoadStaticBuffers
to convert the UPLOAD
VB/IB to DEFAULT
? Are you using x64 native or 32-bit?
from directxtk12.
The issue occurs usually when switching between models - I use one large model for each of our environments. When changing environments I unload it, then load the next. They're all of a similar size to the dump I posted. The environments have a few other models loaded within them but they're all pretty small (~3K verts). When loading the models I do call LoadStaticBuffers
, I guess this is correct?
from directxtk12.
Did you close this because you were able to resolve the issue?
from directxtk12.
Utilising GraphicsMemory::GarbageCollect
after a call to DeviceResources::WaitForGpu
following a reset of model resources did the trick for my runtime model swapping issue. To solve the initial "out of memory" loading issue I simply split my model into two SDKMESH files to load-in which seems to work fine. Up to you if you keep the issue open - it might be worth exploring the problem further as it is repeatable with large individual SDKMESHes.
from directxtk12.
Thanks. I'll keep an eye out for future problems.
I did add some more debugging output in this commit.
BTW, are you using 32-bit or 64-bit native?
from directxtk12.
Appreciate the help! I'm using 64-bit.
from directxtk12.
Related Issues (20)
- How do I return an allocation to DescriptorPile? HOT 3
- Retire VS 2017 support HOT 1
- DirectXTK emits a -Wreserved-identifier warning with clang v13
- Are d3d12sdklayers.dll symbols files available somewhere? HOT 1
- PostProcess Problem with Radeons 570 & 580 HOT 3
- VertexPositionNormal::InputLayout is undefined in the library HOT 1
- PBREffect directional lights still impact metalness when they are supposed to be off HOT 3
- GenerateMips is causing TDR HOT 6
- New game available written using DirectXTK12 HOT 1
- Make namespace configurable (avoid conflict with D3D11 DirectXTK) HOT 4
- Xbox One "Line drawing and anti aliasing" Tutorial Requires IID_GRAPHICS_PPV_ARGS HOT 2
- WICTextureLoader and DDSTextureLoader feature request HOT 3
- GenerateMips on sRGB Textures averaging in gamma space? HOT 3
- Retire legacy Xbox One XDK support
- "Basic Game Loop" from supplied Win32 template results in invalid window regions after window resize HOT 6
- Havok Animation System HOT 1
- MSAAHelper file downloads download wrong version HOT 1
- Nuget package is not compiled with security protections HOT 3
- Wiki Issue for Getting Started -> Animating using model bones HOT 3
- Rust port of DirectXTK12, d3dx12 etc.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directxtk12.