mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
address review and disable test
This commit is contained in:
parent
ef6c6a46fa
commit
ba01ca1ba1
4 changed files with 9 additions and 21 deletions
|
@ -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,
|
||||
));
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
));
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue