mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 02:39:11 +00:00
Query API: QuerySet
- Add QuerySet w/o backends implementation. - Add validation tests Bug: dawn:434 Change-Id: Id9fed4e42fac464b1254cd2e9cf5337a1d803089 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22440 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
70d75c8c00
commit
b6eff5acf0
@@ -24,6 +24,7 @@
|
||||
#include "dawn_native/opengl/CommandBufferGL.h"
|
||||
#include "dawn_native/opengl/ComputePipelineGL.h"
|
||||
#include "dawn_native/opengl/PipelineLayoutGL.h"
|
||||
#include "dawn_native/opengl/QuerySetGL.h"
|
||||
#include "dawn_native/opengl/QueueGL.h"
|
||||
#include "dawn_native/opengl/RenderPipelineGL.h"
|
||||
#include "dawn_native/opengl/SamplerGL.h"
|
||||
@@ -116,6 +117,9 @@ namespace dawn_native { namespace opengl {
|
||||
const PipelineLayoutDescriptor* descriptor) {
|
||||
return new PipelineLayout(this, descriptor);
|
||||
}
|
||||
ResultOrError<QuerySetBase*> Device::CreateQuerySetImpl(const QuerySetDescriptor* descriptor) {
|
||||
return new QuerySet(this, descriptor);
|
||||
}
|
||||
ResultOrError<RenderPipelineBase*> Device::CreateRenderPipelineImpl(
|
||||
const RenderPipelineDescriptor* descriptor) {
|
||||
return new RenderPipeline(this, descriptor);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "common/Platform.h"
|
||||
#include "dawn_native/Device.h"
|
||||
#include "dawn_native/QuerySet.h"
|
||||
#include "dawn_native/opengl/Forward.h"
|
||||
#include "dawn_native/opengl/GLFormat.h"
|
||||
#include "dawn_native/opengl/OpenGLFunctions.h"
|
||||
@@ -75,6 +76,8 @@ namespace dawn_native { namespace opengl {
|
||||
const ComputePipelineDescriptor* descriptor) override;
|
||||
ResultOrError<PipelineLayoutBase*> CreatePipelineLayoutImpl(
|
||||
const PipelineLayoutDescriptor* descriptor) override;
|
||||
ResultOrError<QuerySetBase*> CreateQuerySetImpl(
|
||||
const QuerySetDescriptor* descriptor) override;
|
||||
ResultOrError<RenderPipelineBase*> CreateRenderPipelineImpl(
|
||||
const RenderPipelineDescriptor* descriptor) override;
|
||||
ResultOrError<SamplerBase*> CreateSamplerImpl(const SamplerDescriptor* descriptor) override;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace dawn_native { namespace opengl {
|
||||
class Device;
|
||||
class PersistentPipelineState;
|
||||
class PipelineLayout;
|
||||
class QuerySet;
|
||||
class Queue;
|
||||
class RenderPipeline;
|
||||
class Sampler;
|
||||
@@ -45,6 +46,7 @@ namespace dawn_native { namespace opengl {
|
||||
using ComputePipelineType = ComputePipeline;
|
||||
using DeviceType = Device;
|
||||
using PipelineLayoutType = PipelineLayout;
|
||||
using QuerySetType = QuerySet;
|
||||
using QueueType = Queue;
|
||||
using RenderPipelineType = RenderPipeline;
|
||||
using SamplerType = Sampler;
|
||||
|
||||
32
src/dawn_native/opengl/QuerySetGL.cpp
Normal file
32
src/dawn_native/opengl/QuerySetGL.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2020 The Dawn Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "dawn_native/opengl/QuerySetGL.h"
|
||||
|
||||
#include "dawn_native/opengl/DeviceGL.h"
|
||||
|
||||
namespace dawn_native { namespace opengl {
|
||||
|
||||
QuerySet::QuerySet(Device* device, const QuerySetDescriptor* descriptor)
|
||||
: QuerySetBase(device, descriptor) {
|
||||
}
|
||||
|
||||
QuerySet::~QuerySet() {
|
||||
DestroyInternal();
|
||||
}
|
||||
|
||||
void QuerySet::DestroyImpl() {
|
||||
}
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
36
src/dawn_native/opengl/QuerySetGL.h
Normal file
36
src/dawn_native/opengl/QuerySetGL.h
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright 2020 The Dawn Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef DAWNNATIVE_OPENGL_QUERYSETGL_H_
|
||||
#define DAWNNATIVE_OPENGL_QUERYSETGL_H_
|
||||
|
||||
#include "dawn_native/QuerySet.h"
|
||||
|
||||
namespace dawn_native { namespace opengl {
|
||||
|
||||
class Device;
|
||||
|
||||
class QuerySet final : public QuerySetBase {
|
||||
public:
|
||||
QuerySet(Device* device, const QuerySetDescriptor* descriptor);
|
||||
|
||||
private:
|
||||
~QuerySet() override;
|
||||
|
||||
void DestroyImpl() override;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
|
||||
#endif // DAWNNATIVE_OPENGL_QUERYSETGL_H_
|
||||
Reference in New Issue
Block a user