summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvfx/nvfx_screen.h
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.h
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.h')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.h b/src/gallium/drivers/nvfx/nvfx_screen.h
index ba9a6993ece..678ee406016 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.h
+++ b/src/gallium/drivers/nvfx/nvfx_screen.h
@@ -1,6 +1,7 @@
#ifndef __NVFX_SCREEN_H__
#define __NVFX_SCREEN_H__
+#include <util/u_double_list.h>
#include "nouveau/nouveau_screen.h"
#include "nv04_surface_2d.h"
#include "nvfx_context.h"
@@ -24,6 +25,7 @@ struct nvfx_screen {
/* Query object resources */
struct nouveau_notifier *query;
struct nouveau_resource *query_heap;
+ struct list_head query_list;
/* Vtxprog resources */
struct nouveau_resource *vp_exec_heap;