diff options
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 |
