File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Common/Instrumentation/Include/Methane
Graphics/RHI/Metal/Include/Methane/Graphics/Metal Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ ITT_DOMAIN_EXTERN();
67
67
68
68
#ifdef TRACY_ENABLE
69
69
70
+ #define TRACY_MUTEX (mutex_type ) tracy::Lockable<mutex_type>
70
71
#define TRACY_SET_THREAD_NAME (name ) tracy::SetThreadName(name)
71
72
72
73
#if defined(TRACY_ZONE_CALL_STACK_DEPTH) && TRACY_ZONE_CALL_STACK_DEPTH > 0
@@ -83,6 +84,7 @@ ITT_DOMAIN_EXTERN();
83
84
84
85
#else // ifdef TRACY_ENABLE
85
86
87
+ #define TRACY_MUTEX (mutex_type ) mutex_type
86
88
#define TRACY_SET_THREAD_NAME (name )
87
89
#define TRACY_ZONE_SCOPED ()
88
90
#define TRACY_ZONE_SCOPED_NAME (name )
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public:
57
57
class DataLock
58
58
{
59
59
public:
60
- DataLock (ArgumentsBuffer& arg_buffer);
60
+ explicit DataLock (ArgumentsBuffer& arg_buffer);
61
61
62
62
DataLock (const DataLock& other) = delete ;
63
63
DataLock& operator =(const DataLock& other) = delete ;
@@ -66,8 +66,8 @@ public:
66
66
Data::Byte* GetDataPtr () const noexcept { return m_data_ptr; }
67
67
68
68
private:
69
- std::lock_guard<std::mutex> m_lock;
70
- Data::Byte* m_data_ptr;
69
+ std::lock_guard<TRACY_MUTEX( std::mutex) > m_lock;
70
+ Data::Byte* m_data_ptr;
71
71
};
72
72
73
73
ArgumentsBuffer (const Base::Context& context, Rhi::ProgramArgumentAccessType access_type);
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ Metal implementation of the program bindings interface.
28
28
#include < Methane/Graphics/RHI/ICommandList.h>
29
29
#include < Methane/Graphics/Base/ProgramBindings.h>
30
30
#include < Methane/Data/Range.hpp>
31
+ #include < Methane/Instrumentation.h>
31
32
32
33
#import < Metal/Metal.h>
33
34
@@ -130,10 +131,10 @@ private:
130
131
131
132
using AccessTypeMask = Data::EnumMask<Rhi::ProgramArgumentAccessType>;
132
133
133
- AccessTypeMask m_argument_buffer_initialized_access_types;
134
- ArgumentsRange m_mutable_argument_buffer_range;
135
- NativeResourceSet m_mtl_used_resources;
136
- std::mutex m_used_resources_mutex;
134
+ AccessTypeMask m_argument_buffer_initialized_access_types;
135
+ ArgumentsRange m_mutable_argument_buffer_range;
136
+ NativeResourceSet m_mtl_used_resources;
137
+ TracyLockable ( std::mutex, m_used_resources_mutex) ;
137
138
};
138
139
139
140
} // namespace Methane::Graphics::Metal
You can’t perform that action at this time.
0 commit comments