feat(gx): implement CGxDevice::BufData

This commit is contained in:
phaneron 2023-03-20 18:28:23 -04:00 committed by GitHub
parent 5ccf980c23
commit da23578002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 0 deletions

View file

@ -394,6 +394,14 @@ int32_t CGxDeviceD3d::BufUnlock(CGxBuf* buf, uint32_t size) {
return 1;
}
void CGxDeviceD3d::BufData(CGxBuf* buf, const void* data, size_t size, uintptr_t offset) {
CGxDevice::BufData(buf, data, size, offset);
auto bufData = this->IBufLock(buf);
memcpy(&bufData[offset], data, size);
this->IBufUnlock(buf);
}
void CGxDeviceD3d::CapsWindowSize(CRect& dst) {
dst = this->DeviceCurWindow();
}

View file

@ -258,6 +258,7 @@ class CGxDeviceD3d : public CGxDevice {
virtual void PoolSizeSet(CGxPool* pool, uint32_t size);
virtual char* BufLock(CGxBuf* buf);
virtual int32_t BufUnlock(CGxBuf* buf, uint32_t size);
virtual void BufData(CGxBuf* buf, const void* data, size_t size, uintptr_t offset);
virtual void IShaderCreate(CGxShader* shader);
virtual void ShaderCreate(CGxShader* shaders[], EGxShTarget target, const char* a4, const char* a5, int32_t permutations);
virtual int32_t StereoEnabled();