aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucomputepipeline.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-06-19 21:35:30 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-06-19 21:35:30 +0530
commitf973099020ca162bc139866e2742d2983a3f7856 (patch)
treec016f37ce514f169a7c83ca328340fbf003daf04 /components/script/dom/gpucomputepipeline.rs
parent48ef306bd3f1c9abbd1437e7a8f2b21b7b307a04 (diff)
downloadservo-f973099020ca162bc139866e2742d2983a3f7856.tar.gz
servo-f973099020ca162bc139866e2742d2983a3f7856.zip
Remove validation for GPUBindGroup, GPUBindGroupLayout, GPUPipelineLayout
Diffstat (limited to 'components/script/dom/gpucomputepipeline.rs')
-rw-r--r--components/script/dom/gpucomputepipeline.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/components/script/dom/gpucomputepipeline.rs b/components/script/dom/gpucomputepipeline.rs
index e96697c95a2..cd5fac795d7 100644
--- a/components/script/dom/gpucomputepipeline.rs
+++ b/components/script/dom/gpucomputepipeline.rs
@@ -10,6 +10,7 @@ use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
+use std::cell::Cell;
use webgpu::WebGPUComputePipeline;
#[dom_struct]
@@ -17,20 +18,26 @@ pub struct GPUComputePipeline {
reflector_: Reflector,
label: DomRefCell<Option<DOMString>>,
compute_pipeline: WebGPUComputePipeline,
+ valid: Cell<bool>,
}
impl GPUComputePipeline {
- fn new_inherited(compute_pipeline: WebGPUComputePipeline) -> Self {
+ fn new_inherited(compute_pipeline: WebGPUComputePipeline, valid: bool) -> Self {
Self {
reflector_: Reflector::new(),
label: DomRefCell::new(None),
compute_pipeline,
+ valid: Cell::new(valid),
}
}
- pub fn new(global: &GlobalScope, compute_pipeline: WebGPUComputePipeline) -> DomRoot<Self> {
+ pub fn new(
+ global: &GlobalScope,
+ compute_pipeline: WebGPUComputePipeline,
+ valid: bool,
+ ) -> DomRoot<Self> {
reflect_dom_object(
- Box::new(GPUComputePipeline::new_inherited(compute_pipeline)),
+ Box::new(GPUComputePipeline::new_inherited(compute_pipeline, valid)),
global,
)
}