diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-09-23 20:30:44 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-09-23 21:32:25 +0530 |
commit | ba01ca1ba168d68f5e5aec49bb515b7c24864213 (patch) | |
tree | 349d36daf28a57cb5f07833a7be8fe23c89c66c2 /components/script/dom | |
parent | ef6c6a46fa2905905abba8afb4d8defddf5239d0 (diff) | |
download | servo-ba01ca1ba168d68f5e5aec49bb515b7c24864213.tar.gz servo-ba01ca1ba168d68f5e5aec49bb515b7c24864213.zip |
address review and disable test
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/gpucomputepipeline.rs | 8 | ||||
-rw-r--r-- | components/script/dom/gpurenderpipeline.rs | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/components/script/dom/gpucomputepipeline.rs b/components/script/dom/gpucomputepipeline.rs index 6a85fe1fc1d..604af2373e0 100644 --- a/components/script/dom/gpucomputepipeline.rs +++ b/components/script/dom/gpucomputepipeline.rs @@ -78,15 +78,13 @@ impl GPUComputePipelineMethods for GPUComputePipeline { /// https://gpuweb.github.io/gpuweb/#dom-gpupipelinebase-getbindgrouplayout fn GetBindGroupLayout(&self, index: u32) -> Fallible<DomRoot<GPUBindGroupLayout>> { - if index > self.bind_group_layouts.len() as u32 || - index > self.device.limits().maxBindGroups - { + if index > self.bind_group_layouts.len() as u32 { return Err(Error::Range(String::from("Index out of bounds"))); } - return Ok(GPUBindGroupLayout::new( + Ok(GPUBindGroupLayout::new( &self.global(), self.bind_group_layouts[index as usize], None, - )); + )) } } diff --git a/components/script/dom/gpurenderpipeline.rs b/components/script/dom/gpurenderpipeline.rs index 31dd4029795..9914b1d3114 100644 --- a/components/script/dom/gpurenderpipeline.rs +++ b/components/script/dom/gpurenderpipeline.rs @@ -78,15 +78,13 @@ impl GPURenderPipelineMethods for GPURenderPipeline { /// https://gpuweb.github.io/gpuweb/#dom-gpupipelinebase-getbindgrouplayout fn GetBindGroupLayout(&self, index: u32) -> Fallible<DomRoot<GPUBindGroupLayout>> { - if index > self.bind_group_layouts.len() as u32 || - index > self.device.limits().maxBindGroups - { + if index > self.bind_group_layouts.len() as u32 { return Err(Error::Range(String::from("Index out of bounds"))); } - return Ok(GPUBindGroupLayout::new( + Ok(GPUBindGroupLayout::new( &self.global(), self.bind_group_layouts[index as usize], None, - )); + )) } } |