summaryrefslogtreecommitdiffstats
path: root/source/core
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-09-01 01:25:31 -0700
committerGitHub <noreply@github.com>2023-09-01 01:25:31 -0700
commit9c11a87f8f811a9a110d73a24ab93443ea347506 (patch)
tree9b1b0f154cff0faf7efd8d77fcd7f7911aea4a44 /source/core
parentb7d19330c2d42937835d674758a05af3891e025b (diff)
Fix GLSL code gen around RayQuery and HitObject types. (#3173)
* Update slang-llvm. * Fix. * fix. * Fix unit tests for multi-thread execution. * Fix tests. * fixes. * update tests. * Add gfx-smoke to linux expected failure list. * Try fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/core')
-rw-r--r--source/core/slang-process.h2
-rw-r--r--source/core/unix/slang-unix-process.cpp5
-rw-r--r--source/core/windows/slang-win-process.cpp6
3 files changed, 13 insertions, 0 deletions
diff --git a/source/core/slang-process.h b/source/core/slang-process.h
index 0beb78c06..c36064ac3 100644
--- a/source/core/slang-process.h
+++ b/source/core/slang-process.h
@@ -73,6 +73,8 @@ public:
/// Get the clock tick.
static uint64_t getClockTick();
+ static uint32_t getId();
+
protected:
int32_t m_returnValue = 0; ///< Value returned if process terminated
RefPtr<Stream> m_streams[Index(StdStreamType::CountOf)]; ///< Streams to communicate with the process
diff --git a/source/core/unix/slang-unix-process.cpp b/source/core/unix/slang-unix-process.cpp
index 428bef874..3ab113d83 100644
--- a/source/core/unix/slang-unix-process.cpp
+++ b/source/core/unix/slang-unix-process.cpp
@@ -649,4 +649,9 @@ closePipes:
return SLANG_OK;
}
+uint32_t Process::getId()
+{
+ return getpid();
+}
+
} // namespace Slang
diff --git a/source/core/windows/slang-win-process.cpp b/source/core/windows/slang-win-process.cpp
index e577da0fa..38f733015 100644
--- a/source/core/windows/slang-win-process.cpp
+++ b/source/core/windows/slang-win-process.cpp
@@ -561,4 +561,10 @@ static const uint64_t g_frequency = _getClockFrequency();
return counter.QuadPart;
}
+uint32_t Process::getId()
+{
+ return _getpid();
+}
+
+
} // namespace Slang