From fd27d5f1e4176926d613005f30feb209375d97ea Mon Sep 17 00:00:00 2001 From: Amlal Date: Sat, 15 Feb 2025 09:33:35 +0100 Subject: 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 --- dev/LibSCI/GPU.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'dev/LibSCI/GPU.h') 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 -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 -- cgit v1.2.3