summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2018-09-10 10:08:36 +0100
committerJose Fonseca <[email protected]>2018-09-10 10:10:16 +0100
commitd5f934522d6ae30bbb1b5320309aa29eb720008f (patch)
tree9471fcb7d2ecf214767fdf841f089115bfb407b9 /src/gallium/auxiliary
parentc4017106bb8b5118b68e24d3f5b44c538033cfe3 (diff)
util: Make util_context_thread_changed a no-op on Windows.
Spite using thrd_t types, these functions are wed to pthreads, and break Windows builds, because thrd_current() is not implemented there, as it's impossible to have an efficient thrd_current() implementation on Windows. Trivial.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_helpers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_helpers.c b/src/gallium/auxiliary/util/u_helpers.c
index f773360adde..8095242efd9 100644
--- a/src/gallium/auxiliary/util/u_helpers.c
+++ b/src/gallium/auxiliary/util/u_helpers.c
@@ -134,6 +134,7 @@ util_upload_index_buffer(struct pipe_context *pipe,
void
util_context_thread_changed(struct pipe_context *ctx, thrd_t *upper_thread)
{
+#ifdef HAVE_PTHREAD
thrd_t current = thrd_current();
int cache = util_get_L3_for_pinned_thread(current,
util_cpu_caps.cores_per_L3);
@@ -158,6 +159,7 @@ util_context_thread_changed(struct pipe_context *ctx, thrd_t *upper_thread)
/* Do the same for the upper level thread if there is any (e.g. glthread) */
if (upper_thread)
util_pin_thread_to_L3(*upper_thread, cache, util_cpu_caps.cores_per_L3);
+#endif
}
/* This is a helper for hardware bring-up. Don't remove. */