Commit a99f31bc authored by David Heidelberg's avatar David Heidelberg Committed by Emil Velikov

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" <>
Tested-by: Yaroslav Andrusyak's avatarYaroslav Andrusyak <>
Reviewed-by: Ilia Mirkin's avatarIlia Mirkin <>
Reviewed-by: Axel Davy's avatarAxel Davy <>
Signed-off-by: David Heidelberg's avatarDavid Heidelberg <>
parent 4eea2496
......@@ -423,7 +423,11 @@ NineDevice9_TestCooperativeLevel( struct NineDevice9 *This )
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;
return UINT_MAX;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment