aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpusampler.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-06-02 15:36:08 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-06-17 12:45:40 +0530
commit00b3f785c4d4bb4da9d883128d9dc18e0406ad71 (patch)
treeca3b3c0a162eb17863fa802f50d090c4f45ea3ad /components/script/dom/gpusampler.rs
parentabc3ed40c9daf8c7a68d82a2d5fb40ad632eb27f (diff)
downloadservo-00b3f785c4d4bb4da9d883128d9dc18e0406ad71.tar.gz
servo-00b3f785c4d4bb4da9d883128d9dc18e0406ad71.zip
Add GPUSampler and GPUTextureView to BindingResource
Add validation for BindGroups
Diffstat (limited to 'components/script/dom/gpusampler.rs')
-rw-r--r--components/script/dom/gpusampler.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/dom/gpusampler.rs b/components/script/dom/gpusampler.rs
index db85f60e9b6..488d3df1d05 100644
--- a/components/script/dom/gpusampler.rs
+++ b/components/script/dom/gpusampler.rs
@@ -64,6 +64,20 @@ impl GPUSampler {
}
}
+impl GPUSampler {
+ pub fn id(&self) -> WebGPUSampler {
+ self.sampler
+ }
+
+ pub fn is_valid(&self) -> bool {
+ self.valid.get()
+ }
+
+ pub fn compare(&self) -> bool {
+ self.compare_enable
+ }
+}
+
impl GPUSamplerMethods for GPUSampler {
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
fn GetLabel(&self) -> Option<DOMString> {