[DX11]UpdateSubresource-What am I missing?

Started by
12 comments, last by DieterVW 13 years, 11 months ago
whats the max size for a vertex buffer? I cant find it..
Advertisement
The D3D11.h file has a set of #defines at the top indicating all of the limits/bounds of the API. It contains D3D11_REQ_RESOURCE_SIZE_IN_MEGABYTES_EXPRESSION_A_TERM which is 128 meg. You might be able to create something larger but that depends on if the driver wants to let you.
DieterVW, so just to double-check, the best way to render a scene is to have big dynamic vertex/index buffers per input layout that are filled on the fly each frame as opposed to storing the geometry on a per mesh basis, right?
There are several things involved in answering the question of what is best.

Packing several models with the same layout into a single buffer, whether it is dynamic, immutable, or default, should have some gains since it can be left bound to the pipeline for more draw calls and it fragments memory less.

I only recommend dynamic buffers for model data that needs changing on a relatively frequent basis. You do not want to be uploading the same model data to the GPU every frame, so data that will persist for a while should be moved out of the dynamic buffer and into a default buffer.

This topic is closed to new replies.

Advertisement