summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_jit.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-02-06 13:09:46 -0800
committerRoland Scheidegger <[email protected]>2013-02-08 16:32:30 -0800
commit8e44f4117a9c73ea336063f7c2fbf4d6a592eeae (patch)
treebb5858ca7853a10037a0395f85702135e0ac1789 /src/gallium/drivers/llvmpipe/lp_jit.h
parent3310acdf4756feb82bf043e7663b6dd8d6e3f7c9 (diff)
llvmpipe: refactoring of visibility counter handling
There can be other per-thread data than just vis_counter, so pass a struct around instead (some of our non-public code uses this already and this difference is a major cause of merge pain). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.h b/src/gallium/drivers/llvmpipe/lp_jit.h
index 3057c0dc2b0..472d3911e71 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.h
+++ b/src/gallium/drivers/llvmpipe/lp_jit.h
@@ -162,6 +162,22 @@ enum {
lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_CTX_SAMPLERS, "samplers")
+struct lp_jit_thread_data
+{
+ uint32_t vis_counter;
+};
+
+
+enum {
+ LP_JIT_THREAD_DATA_COUNTER = 0,
+ LP_JIT_THREAD_DATA_COUNT
+};
+
+
+#define lp_jit_thread_data_counter(_gallivm, _ptr) \
+ lp_build_struct_get_ptr(_gallivm, _ptr, LP_JIT_THREAD_DATA_COUNTER, "counter")
+
+
/**
* typedef for fragment shader function
*
@@ -189,7 +205,7 @@ typedef void
uint8_t **color,
void *depth,
uint32_t mask,
- uint32_t *counter,
+ struct lp_jit_thread_data *thread_data,
unsigned *stride);