blob: cde32dd66209291b486c2b72b6727013f509ebb2 [file] [log] [blame]
Corentin Wallez4a9ef4e2018-07-18 11:40:26 +02001// Copyright 2017 The Dawn Authors
Corentin Wallezf07e3bd2017-04-20 14:38:20 -04002//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Corentin Wallez30965a72018-07-24 16:42:33 +020015#ifndef DAWNNATIVE_SAMPLER_H_
16#define DAWNNATIVE_SAMPLER_H_
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040017
Corentin Wallezd37523f2018-07-24 13:53:51 +020018#include "dawn_native/Error.h"
Corentin Wallez9e4518b2018-10-15 12:54:30 +000019#include "dawn_native/ObjectBase.h"
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040020
Corentin Wallez36afbb62018-07-25 17:03:23 +020021#include "dawn_native/dawn_platform.h"
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040022
Corentin Wallez49a65d02018-07-24 16:45:45 +020023namespace dawn_native {
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040024
Corentin Wallez1ae19e82018-05-17 17:09:07 -040025 class DeviceBase;
26
Corentin Wallez36afbb62018-07-25 17:03:23 +020027 MaybeError ValidateSamplerDescriptor(DeviceBase* device, const SamplerDescriptor* descriptor);
Corentin Wallez1ae19e82018-05-17 17:09:07 -040028
Corentin Wallez9e4518b2018-10-15 12:54:30 +000029 class SamplerBase : public ObjectBase {
Corentin Wallezc1400f02017-11-24 13:59:42 -050030 public:
Corentin Wallez36afbb62018-07-25 17:03:23 +020031 SamplerBase(DeviceBase* device, const SamplerDescriptor* descriptor);
Corentin Walleza594f8f2019-02-13 13:09:18 +000032
33 static SamplerBase* MakeError(DeviceBase* device);
34
35 private:
36 SamplerBase(DeviceBase* device, ObjectBase::ErrorTag tag);
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040037 };
38
Corentin Wallez49a65d02018-07-24 16:45:45 +020039} // namespace dawn_native
Corentin Wallezf07e3bd2017-04-20 14:38:20 -040040
Corentin Wallez30965a72018-07-24 16:42:33 +020041#endif // DAWNNATIVE_SAMPLER_H_