diff options
author | Qicheng Christopher Li <[email protected]> | 2010-05-06 11:45:42 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-05-06 11:45:45 -0600 |
commit | 86afe8250edaa2e6129c937a62a695f616c48d70 (patch) | |
tree | c3800f2b0ff2daf025865d4ab3003b9741041b7e /src/gallium/drivers/llvmpipe/lp_query.h | |
parent | f587615e13cf55504c6060d4621506d65b608774 (diff) |
llvmpipe: implement occlusion query
OpenGL occlusion queries work now. The Mesa demos, glean test and piglit
tests all pass. A few enhancements are possible in the future. -Brian
Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_query.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_query.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.h b/src/gallium/drivers/llvmpipe/lp_query.h index fa9fcd87139..721c41cb5c9 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.h +++ b/src/gallium/drivers/llvmpipe/lp_query.h @@ -1,6 +1,7 @@ /************************************************************************** * * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * Copyright 2010 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -25,14 +26,33 @@ * **************************************************************************/ -/* Author: - * Keith Whitwell +/* Authors: + * Keith Whitwell, Qicheng Christopher Li, Brian Paul */ #ifndef LP_QUERY_H #define LP_QUERY_H +#include <limits.h> +#include "os/os_thread.h" +#include "lp_limits.h" + + struct llvmpipe_context; + + +struct llvmpipe_query { + uint64_t count[LP_MAX_THREADS]; /**< a counter for each thread */ + uint64_t result; /**< total of all counters */ + + pipe_mutex mutex; + unsigned num_tiles, tile_count; + + boolean done; + boolean binned; /**< has this query been binned in the scene? */ +}; + + extern void llvmpipe_init_query_funcs(struct llvmpipe_context * ); |