summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_screen.c
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-01-18 01:02:55 +0100
committerLuca Barbieri <[email protected]>2010-04-12 23:36:21 +0200
commit9ad385fef95e8f8b9ecf89c85fb443e30196e9c2 (patch)
tree0a40214011a89573d2c48d92fb6939e4cdb25ace /src/gallium/drivers/nvfx/nvfx_screen.c
parent202760b4372fbe8488b0c6b93578697ae81fd430 (diff)
nvfx: support an unlimited number of occlusion queries
Currently on nv30/nv40 an assert will be triggered once 32 queries are outstanding. This violates the OpenGL/Gallium interface, which requires support for an unlimited number of fences. This patch fixes the problem by putting queries in a linked list and waiting on the oldest one if allocation fails. nVidia seems to use a similar strategy, but with 1024 instead of 32 fences. The next patch will improve this.
Diffstat (limited to 'src/gallium/drivers/nvfx/nvfx_screen.c')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 9236c8d256a..651e6ee64b6 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -411,6 +411,8 @@ nvfx_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
return NULL;
}
+ LIST_INITHEAD(&screen->query_list);
+
/* Vtxprog resources */
if (nouveau_resource_init(&screen->vp_exec_heap, 0, screen->is_nv4x ? 512 : 256) ||
nouveau_resource_init(&screen->vp_data_heap, 0, 256)) {