summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/device9.h
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-09-30 16:42:10 +0200
committerAxel Davy <[email protected]>2016-02-04 22:12:17 +0100
commit1a893ac8869a0be08582f3b224d1a92ff37fc400 (patch)
tree6912bfddcb4c3f75a5b7343fd46dc1738d496ca5 /src/gallium/state_trackers/nine/device9.h
parenta961ec335d5f38c07181e4956341c9b4cca59fa4 (diff)
st/nine: Implement NineDevice9_GetAvailableTextureMem
Implement a device private memory counter similar to Win 7. Only textures and surfaces increment vidmem and may return ERR_OUTOFVIDEOMEMORY. Vertexbuffers and indexbuffers creation always succeedes, even when out of video memory. Fixes "Vampire: The Masquerade - Bloodlines" allocating resources until crash. Fixes "Age of Conan" allocating resources until crash. Fixes failing WINE test device.c test_vidmem_accounting(). Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.h')
-rw-r--r--src/gallium/state_trackers/nine/device9.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h
index f462bcb1c36..34edf0cfa48 100644
--- a/src/gallium/state_trackers/nine/device9.h
+++ b/src/gallium/state_trackers/nine/device9.h
@@ -139,6 +139,8 @@ struct NineDevice9
struct pipe_resource *dummy_vbo;
BOOL device_needs_reset;
int minor_version_num;
+ long long available_texture_mem;
+ long long available_texture_limit;
};
static inline struct NineDevice9 *
NineDevice9( void *data )