diff options
Diffstat (limited to 'dev/LibSCI')
| -rw-r--r-- | dev/LibSCI/GPU.h | 13 | ||||
| -rw-r--r-- | dev/LibSCI/Macros.h | 15 |
2 files changed, 21 insertions, 7 deletions
diff --git a/dev/LibSCI/GPU.h b/dev/LibSCI/GPU.h index 892a85ff..6ee937f5 100644 --- a/dev/LibSCI/GPU.h +++ b/dev/LibSCI/GPU.h @@ -23,21 +23,20 @@ struct GPUCmdBuffer; /// ------------------------------------------------------------------------------------------ // struct GPUCmdBuffer final { - SizeT X, Y, Z; - VoidPtr FrameData; - SizeT FrameDataSz; - SizeT BackBufferLayer; + VoidPtr Data; + SizeT DataSz; + SizeT BufferLayer; Bool IsGPGPUData; - Bool BackBufferFirst; + Bool BufferFirst; Bool isGPGPUData() { - return !this->BackBufferFirst && this->IsGPGPUData; + return !this->BufferFirst && this->IsGPGPUData; } Bool isValid() { - return this->FrameData && this->FrameDataSz > 0; + return this->Data && (this->DataSz > 0) && (MmGetHeapFlags(this->Data) != -1); } }; diff --git a/dev/LibSCI/Macros.h b/dev/LibSCI/Macros.h index 5f4253de..62d522c9 100644 --- a/dev/LibSCI/Macros.h +++ b/dev/LibSCI/Macros.h @@ -54,3 +54,18 @@ typedef IOObject FSObject; typedef SCIObject DLLObject; typedef SCIObject ThreadObject; typedef SCIObject SocketObject; + +#ifdef __cplusplus +typedef decltype(nullptr) nullPtr; +typedef decltype(nullptr) NullPtr; +#endif + +EXTERN_C void _rtl_assert(Bool expr, const Char* origin); + +#define MUST_PASS(X) _rtl_assert(X, __FILE__) + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(a) \ + (((sizeof(a) / sizeof(*(a))) / \ + (static_cast<Kernel::Size>(!(sizeof(a) % sizeof(*(a))))))) +#endif
\ No newline at end of file |
