diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-24 10:38:36 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-01-24 10:38:36 +0100 |
| commit | 7b4bd3577a31d0f0adc7371840642791ae1567f4 (patch) | |
| tree | 1a8afc973aaa739d0d763315cad2fd376d1cea9c /dev/LibSCI/GPU.h | |
ADD: Open version, with important changes kept out.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/LibSCI/GPU.h')
| -rw-r--r-- | dev/LibSCI/GPU.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dev/LibSCI/GPU.h b/dev/LibSCI/GPU.h new file mode 100644 index 00000000..a032e87b --- /dev/null +++ b/dev/LibSCI/GPU.h @@ -0,0 +1,52 @@ +/* ------------------------------------------- + +Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved. + +File: GPU.h +Purpose: GFX System Calls. + +------------------------------------------- */ + +#ifndef SCIKIT_GPU_H +#define SCIKIT_GPU_H + +#include <SCI.h> + +struct GPUCmdBuffer; + +/// ------------------------------------------------------------------------------------------ // +/// @brief GPU API. +/// ------------------------------------------------------------------------------------------ // + +/// ------------------------------------------------------------------------------------------ // +/// @brief Command buffer structure type. +/// ------------------------------------------------------------------------------------------ // +struct GPUCmdBuffer final +{ + SizeT X, Y, Z; + VoidPtr FrameData; + SizeT FrameDataSz; + SizeT BackBufferLayer; + Bool IsGPGPUData; + Bool BackBufferFirst; + + Bool isGPGPUData() + { + return !this->BackBufferFirst && this->IsGPGPUData; + } + + Bool isValid() + { + return this->FrameData && this->FrameDataSz > 0; + } +}; + +typedef VoidPtr GPUObject; + +IMPORT_C GPUObject GPUNewFromDeviceName(_Input const Char* device_name); + +IMPORT_C SInt32 GPUDisposeDevice(GPUObject gpu_handle, Bool cancel_all, Bool flush_all); + +IMPORT_C SInt32 GPUSendCmdBufferListWithCnt(GPUCmdBuffer** cmd_list, SizeT cmd_list_cnt); + +#endif // ifndef SCIKIT_GPU_H |
