Skip to content

Commit 2808781

Browse files
committed
fixes for intel igpu + shader log support
1 parent 26cf591 commit 2808781

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+348
-741
lines changed

sources/Core/Profiling/Profiling.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,4 +206,10 @@ class ScopedCounter
206206
#define PROFILE(x) auto UNIQUE_NAME = Profiler::get().start(x);
207207
#else
208208
#define PROFILE(x) ;
209+
#endif
210+
211+
#ifdef PROFILING
212+
#define PROFILE_GPU(x) auto UNIQUE_NAME = Eventer::thread_current?Eventer::thread_current->start(x):Timer(nullptr, nullptr);
213+
#else
214+
#define PROFILE_GPU(x) ;
209215
#endif

sources/DirectXFramework/DX12/Buffer.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,19 @@ namespace DX12
587587
return Base::get_max_usage();
588588
}
589589

590+
void debug_print(CommandList & list)
591+
{
592+
593+
list.get_copy().read_buffer(buffer.get(), 0, sizeof(T)*16, [this](const char* data, UINT64 size)
594+
{
595+
Log::get() << "debug_print" << Log::endl;
596+
auto result = reinterpret_cast<const T*>(data);
597+
598+
for(int i=0;i<16;i++)
599+
Log::get() << result[i] << Log::endl;
600+
});
601+
}
602+
590603
void prepare(CommandList::ptr& list)
591604
{
592605
std::lock_guard<std::mutex> g(m);

0 commit comments

Comments
 (0)