Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement WebGPU ErrorScopes #27285
Merged
Implement WebGPU ErrorScopes #27285
Conversation
highfive
commented
Jul 15, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jul 15, 2020
|
I think I understand the code better now, and it's almost there. |
|
beautiful, thank you! |
|
@kvark I have attempted to solve the |
|
Looks fine for now, thank you! |
|
@bors-servo r+ |
|
|
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
kunalmohan commentedJul 15, 2020
•
edited
This PR covers the following-
RenderPipelineDescriptor)pushErrorScopeandpopErrorScope.BGLif an equivalent already exists.A brief explanation of the ErrorScope Implementation-
HashMap<u64, ErrorScopeInfo>inGPUDevice.ErrorScopeInfois a new struct used to store all necessary info for an ErrorScope.Vec<u64>to keep track of the ErrorScope hierarchy.next_scope_idis used to get thescope_idfor a new Scope.scope_idof top-level scope to the server in the message for an operation. The server performs the operation and sends back the scope_id with the result message (only if a scope_id was sent from the client. Otherwise no message is sent.).HashMap<WebGPUDevice, Dom<GPUDevice>>inGlobalScopeto access them fromScriptThread.GPUDevicewe send thePipelineIdof the pipeline it was created in so that when the server send the response, we can access the device from the GlobalScope of that Pipeline.GPUErrorinGlobalScope(if required) can call the necessary fn inGPUDevice.This implementation is pretty rough and not complete at all. Broadly the following cases aren't handled at the moment-
UncapturedErrorEventsis not implemented.As for Equivalent BGLs we now store
Vec<(Vec<wgt::BindGroupLayoutEntry>, Dom<GPUBindGroupLayout>)>inGPUDeviceand compareVec<wgt::BindGroupLayoutEntry>for new BGL with the existing ones and return one if it is found. Otherwise a new one is created and an entry added to theVec.r?@kvark
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors