Do DirectX Textures take away / reduce the application address space (32 bits)?

Imagine the following:

  • A 32-bit application that has 2 GB of address space and therefore can allocate at max. 2 GB of memory (let fragmentation be nearby)
  • Graphics card with 1 GB of graphics memory

When an application uses, for example, 1.5 GB of memory, can it allocate another 1 GB of texture? It will use a total of 2.5 GB of memory, which is impossible for the 32-bit application itself.

AFAIK texts are displayed only in the application address space when it "locks" the texture to get a pointer to memory. Therefore, my assumption is that the address space is only required during blocking. Since only some textures are locked, it should not consume the entire address space.

+3
source share
1 answer

When an application uses, for example, 1.5 GB of memory, can it allocate another GB of texture?

There is no simple answer to this question, since textures can be allocated in the video memory, but they can also be in the system memory.

So it depends on the use.

Take this constructor and pay attention to the pool parameter:

public Texture(
    Device device,
    int width,
    int height,
    int numLevels,
    Usage usage,
    Format format,
    Pool pool
)

Pool.VideoMemory, , , , . Pool.SystemMemory, , , .

:

surface->LockRect(&bits,0,0)

, . . , , .

DX, VideoMemory, .

, , .

+1

All Articles