Browse Source

st/nine: return GetAvailableTextureMem in bytes as expected (v2)

PIPE_CAP_VIDEO_MEMORY returns the amount of video memory in megabytes,
so need to converted it to bytes.

Fixed Warframe memory detection.

v2: also prepare for cards with more than 4GB memory

Cc: "10.4" <mesa-stable@lists.freedesktop.org>
Tested-by: Yaroslav Andrusyak <pontostroy@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: David Heidelberg <david@ixit.cz>
tags/10.5-branchpoint
David Heidelberg 11 years ago
parent
commit
a99f31bced
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/gallium/state_trackers/nine/device9.c

+ 5
- 1
src/gallium/state_trackers/nine/device9.c View File

@@ -423,7 +423,11 @@ NineDevice9_TestCooperativeLevel( struct NineDevice9 *This )
UINT WINAPI
NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This )
{
return This->screen->get_param(This->screen, PIPE_CAP_VIDEO_MEMORY);
const unsigned mem = This->screen->get_param(This->screen, PIPE_CAP_VIDEO_MEMORY);
if (mem < 4096)
return mem << 20;
else
return UINT_MAX;
}

HRESULT WINAPI

Loading…
Cancel
Save