nvfx: support an unlimited number of occlusion queries
authorLuca Barbieri <luca@luca-barbieri.com>
Mon, 18 Jan 2010 00:02:55 +0000 (01:02 +0100)
committerLuca Barbieri <luca@luca-barbieri.com>
Mon, 12 Apr 2010 21:36:21 +0000 (23:36 +0200)
commit9ad385fef95e8f8b9ecf89c85fb443e30196e9c2
tree0a40214011a89573d2c48d92fb6939e4cdb25ace
parent202760b4372fbe8488b0c6b93578697ae81fd430
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.
src/gallium/drivers/nvfx/nvfx_query.c
src/gallium/drivers/nvfx/nvfx_screen.c
src/gallium/drivers/nvfx/nvfx_screen.h