diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-15 09:33:35 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-15 09:34:51 +0100 |
| commit | fd27d5f1e4176926d613005f30feb209375d97ea (patch) | |
| tree | a18b18718b77ca9248f56936a3cef0112c24ce51 /dev/LibSCI/GPU.h | |
| parent | 0db25895168df6ebb9bd8781e3ffd83d3323b398 (diff) | |
Impl and Patches:
- Private tools directory.
- SCI gets new API.
- Window Manager library.
- Steps version 2.
- Patch 'open' command.
- ATA.h fixes.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/LibSCI/GPU.h')
| -rw-r--r-- | dev/LibSCI/GPU.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/dev/LibSCI/GPU.h b/dev/LibSCI/GPU.h index fee621e6..52ae6b1d 100644 --- a/dev/LibSCI/GPU.h +++ b/dev/LibSCI/GPU.h @@ -7,45 +7,50 @@ Purpose: GFX System Calls. ------------------------------------------- */ -#ifndef SCIKIT_GPU_H -#define SCIKIT_GPU_H +#ifndef SCI_GPU_H +#define SCI_GPU_H #include <LibSCI/SCI.h> -struct GPUCmdBuffer; - /// ------------------------------------------------------------------------------------------ // /// @brief GPU API. /// ------------------------------------------------------------------------------------------ // +struct GPUCmdBuffer; + +typedef VoidPtr GPUObject; + /// ------------------------------------------------------------------------------------------ // /// @brief Command buffer structure type. /// ------------------------------------------------------------------------------------------ // struct GPUCmdBuffer final { - VoidPtr Data; - SizeT DataSz; - SizeT BufferLayer; - Bool IsGPGPUData; - Bool BufferFirst; + VoidPtr Data{nullptr}; + SizeT DataSz{0}; + SizeT BufferLayer{0}; + Bool IsGPGPUData{false}; + Bool BufferFirst{false}; Bool isGPGPUData() { return this->isValid() && !this->BufferFirst && this->IsGPGPUData; } + Bool isBackBuffer() + { + return !this->BufferFirst; + } + Bool isValid() { return this->Data && (this->DataSz > 0) && (MmGetHeapFlags(this->Data) != -1); } }; -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 +#endif // ifndef SCI_GPU_H |
