Skip to content

Commit

Permalink
Auto merge of #26714 - kunalmohan:gpu-render-pipeline, r=jdm
Browse files Browse the repository at this point in the history
Implement GPURenderPipeline

<!-- Please describe your changes on the following line: -->
We need to wait for #26699 to merge before this.
A significant amount of validation still needs to be added. I plan on doing that in a follow-up PR.
r?@kvark

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
  • Loading branch information
bors-servo committed May 30, 2020
2 parents dafcee4 + 130de8b commit 05e5fbc
Show file tree
Hide file tree
Showing 16 changed files with 664 additions and 24 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions components/script/Cargo.toml
Expand Up @@ -32,6 +32,7 @@ serde_json = "1.0"
[dependencies]
accountable-refcell = { version = "0.2.0", optional = true }
app_units = "0.7"
arrayvec = "0.5.1"
backtrace = { version = "0.3", optional = true }
base64 = "0.10.1"
bitflags = "1.0"
Expand Down
7 changes: 5 additions & 2 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -1134,7 +1134,7 @@ def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type,

if type.isDictionary():
# There are no nullable dictionaries
assert not type.nullable()
assert not type.nullable() or (isMember and isMember != "Dictionary")

typeName = "%s::%s" % (CGDictionary.makeModuleName(type.inner),
CGDictionary.makeDictionaryName(type.inner))
Expand Down Expand Up @@ -6645,7 +6645,10 @@ def membersNeedTracing(self):

@staticmethod
def makeDictionaryName(dictionary):
return dictionary.identifier.name
if isinstance(dictionary, IDLWrapperType):
return CGDictionary.makeDictionaryName(dictionary.inner)
else:
return dictionary.identifier.name

def makeClassName(self, dictionary):
return self.makeDictionaryName(dictionary)
Expand Down
3 changes: 2 additions & 1 deletion components/script/dom/bindings/trace.rs
Expand Up @@ -160,7 +160,7 @@ use uuid::Uuid;
use webgpu::{
wgpu::command::RawPass, WebGPU, WebGPUAdapter, WebGPUBindGroup, WebGPUBindGroupLayout,
WebGPUBuffer, WebGPUCommandBuffer, WebGPUCommandEncoder, WebGPUComputePipeline, WebGPUDevice,
WebGPUPipelineLayout, WebGPUQueue, WebGPUSampler, WebGPUShaderModule,
WebGPUPipelineLayout, WebGPUQueue, WebGPURenderPipeline, WebGPUSampler, WebGPUShaderModule,
};
use webrender_api::{DocumentId, ImageKey};
use webxr_api::SwapChainId as WebXRSwapChainId;
Expand Down Expand Up @@ -556,6 +556,7 @@ unsafe_no_jsmanaged_fields!(WebGPUBuffer);
unsafe_no_jsmanaged_fields!(WebGPUBindGroup);
unsafe_no_jsmanaged_fields!(WebGPUBindGroupLayout);
unsafe_no_jsmanaged_fields!(WebGPUComputePipeline);
unsafe_no_jsmanaged_fields!(WebGPURenderPipeline);
unsafe_no_jsmanaged_fields!(WebGPUPipelineLayout);
unsafe_no_jsmanaged_fields!(WebGPUQueue);
unsafe_no_jsmanaged_fields!(WebGPUShaderModule);
Expand Down
11 changes: 11 additions & 0 deletions components/script/dom/gpucolorwrite.rs
@@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::dom::bindings::reflector::Reflector;
use dom_struct::dom_struct;

#[dom_struct]
pub struct GPUColorWrite {
reflector_: Reflector,
}

0 comments on commit 05e5fbc

Please sign in to comment.