From 154de2f68bc149f2b3e46203459be69e888a5d12 Mon Sep 17 00:00:00 2001 From: Dustin Graves Date: Fri, 5 Feb 2016 16:06:21 -0700 Subject: layers: Fix 32-bit Windows build A reinterpret_cast from a non-dispatch handle to uint64_t was failing on windows 32-bit where non-dispatch handles are defined as 'typdef uint64_t object'. Changed reinterpret_cast to a C-style cast, as is consistent with the rest of the non-dispatch handle to uint64_t conversions in draw_state. --- layers/threading.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/threading.h b/layers/threading.h index 0b8e947d..a0b025f7 100644 --- a/layers/threading.h +++ b/layers/threading.h @@ -82,7 +82,7 @@ template class counter { if (use_data->reader_count == 0) { // There are no readers. Two writers just collided. if (use_data->thread != tid) { - skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, reinterpret_cast(object), + skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), /*location*/ 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", typeName, use_data->thread, tid); @@ -109,7 +109,7 @@ template class counter { } else { // There are readers. This writer collided with them. if (use_data->thread != tid) { - skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, reinterpret_cast(object), + skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), /*location*/ 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", typeName, use_data->thread, tid); @@ -163,7 +163,7 @@ template class counter { use_data->thread = tid; } else if (uses[object].writer_count > 0 && uses[object].thread != tid) { // There is a writer of the object. - skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, reinterpret_cast(object), + skipCall |= log_msg(report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, objectType, (uint64_t)(object), /*location*/ 0, THREADING_CHECKER_MULTIPLE_THREADS, "THREADING", "THREADING ERROR : object of type %s is simultaneously used in thread %ld and thread %ld", typeName, uses[object].thread, tid); -- cgit v1.2.3