yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
964 B45 linesraw
1// debug-fence.cpp
2#include "debug-fence.h"
3
4#include "debug-helper-functions.h"
5
6namespace gfx
7{
8using namespace Slang;
9
10namespace debug
11{
12
13Result DebugFence::getSharedHandle(InteropHandle* outHandle)
14{
15    SLANG_GFX_API_FUNC;
16    return baseObject->getSharedHandle(outHandle);
17}
18
19Result DebugFence::getNativeHandle(InteropHandle* outNativeHandle)
20{
21    SLANG_GFX_API_FUNC;
22    return baseObject->getNativeHandle(outNativeHandle);
23}
24
25Result DebugFence::getCurrentValue(uint64_t* outValue)
26{
27    SLANG_GFX_API_FUNC;
28    return baseObject->getCurrentValue(outValue);
29}
30
31Result DebugFence::setCurrentValue(uint64_t value)
32{
33    SLANG_GFX_API_FUNC;
34    if (value < maxValueToSignal)
35    {
36        GFX_DIAGNOSE_ERROR_FORMAT(
37            "Cannot set fence value (%d) to lower than pending signal value (%d) on the fence.",
38            value,
39            maxValueToSignal);
40    }
41    return baseObject->setCurrentValue(value);
42}
43
44} // namespace debug
45} // namespace gfx