Results 1 to 3 of 3

Thread: [D3D] calculate video-memory-usage

  1. #1

    [D3D] calculate video-memory-usage

    Hi all.

    I thought it would be nice to let the engine keep track of the ammount of videomemory used.
    Now i do it like this (i add all these numbers):

    Displaymode:
    >>width * height * bitdepth (can be 2 or 4 bytes)

    VertexBuffers
    >>VertexCount * SizeOf(VertexRecord)

    IndexBuffers
    >>IndiceCount * 2 (i use D3DFMT_INDEX16)

    Textures
    >>Width * Height * BitDepth (Bitdepth depending on the display mode)

    I just calculate the ammount of bytes taken by the display and add the sum of the memory-usage of all vertexbuffers, indexbuffers and textures.

    Is the above way accurate?? Are there better ways?? How do you guys do this

    Thnx in advance.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2

    [D3D] calculate video-memory-usage

    i would guess it's somewhat accurate. only displaymode would be a problem to calculate. are you using color display only or do you have depth buffering, double buffering, alpha, stencil, aux, fsaa?
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  3. #3

    [D3D] calculate video-memory-usage

    I use a program called

    MemStatus 2.4 by
    Kevin Reems (2003)

    It shows memory and video memory usage.

    It is excellent. I am working on a huge project, a team has been working on it for 12 months, and we found that the software had problems releasing video memory. This program allowed me to discover the problem and I was able to experiment to discover what the problem was and fix it.

    I would post it. But a major problem with PGD is that it is impossible attach files directly.
    The views expressed on this programme are bloody good ones. - Fred Dagg

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •