Add new GPU Query API that is lightweight and supports occlusion queries
This commit is contained in:
@@ -160,6 +160,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
uint64 BeginQuery(GPUQueryType type) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EndQuery(uint64 queryID) override
|
||||
{
|
||||
}
|
||||
|
||||
void SetViewport(const Viewport& viewport) override
|
||||
{
|
||||
}
|
||||
|
||||
@@ -144,6 +144,11 @@ void GPUDeviceNull::WaitForGPU()
|
||||
{
|
||||
}
|
||||
|
||||
bool GPUDeviceNull::GetQueryResult(uint64 queryID, uint64& result, bool wait)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
GPUTexture* GPUDeviceNull::CreateTexture(const StringView& name)
|
||||
{
|
||||
PROFILE_MEM(GraphicsTextures);
|
||||
|
||||
@@ -20,18 +20,15 @@ class GPUDeviceNull : public GPUDevice
|
||||
friend GPUSwapChainNull;
|
||||
|
||||
private:
|
||||
|
||||
GPUContextNull* _mainContext;
|
||||
GPUAdapterNull* _adapter;
|
||||
|
||||
public:
|
||||
|
||||
static GPUDevice* Create();
|
||||
GPUDeviceNull();
|
||||
~GPUDeviceNull();
|
||||
|
||||
public:
|
||||
|
||||
// [GPUDevice]
|
||||
GPUContext* GetMainContext() override;
|
||||
GPUAdapter* GetAdapter() const override;
|
||||
@@ -41,6 +38,7 @@ public:
|
||||
void Draw() override;
|
||||
void Dispose() override;
|
||||
void WaitForGPU() override;
|
||||
bool GetQueryResult(uint64 queryID, uint64& result, bool wait = false) override;
|
||||
GPUTexture* CreateTexture(const StringView& name) override;
|
||||
GPUShader* CreateShader(const StringView& name) override;
|
||||
GPUPipelineState* CreatePipelineState() override;
|
||||
|
||||
Reference in New Issue
Block a user