Skip to content

Commit

Permalink
Only keep track of sub-objects when necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
fyellin committed Oct 21, 2024
1 parent ca67b7e commit 4930bee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests_mem/test_object_retention.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
fn vertex_main( @location(0) position: vec2f ) -> @builtin(position) vec4f {
return vec4f(position + offset, 0, 1.0);
}
@fragment
fn fragment_main() -> @location(0) vec4f {
return vec4f();
fn fragment_main() -> @location(0) vec4f {
return vec4f();
}
@compute
@workgroup_size(1)
fn main(@builtin(global_invocation_id) index: vec3<u32>) {
Expand Down
3 changes: 1 addition & 2 deletions wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3329,8 +3329,7 @@ def finish(self, *, label: str = ""):
id = libf.wgpuRenderBundleEncoderFinish(self._internal, struct)
# The other encoders require that we call self._release() when
# we're done with it. But that doesn't seem to be an issue here.
# There doesn't seem to be an issue with needing to keep the objects alive after
# the call to finish().
# We no longer need to keep these objects alive after the call to finish().
self._objects_to_keep_alive.clear()
return GPURenderBundle(label, id, self._device)

Expand Down
2 changes: 1 addition & 1 deletion wgpu/resources/codegen_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Diffs for GPUTextureView: add size, add texture
* Diffs for GPUBindingCommandsMixin: change set_bind_group
* Diffs for GPUQueue: add read_buffer, add read_texture, hide copy_external_image_to_texture
* Validated 37 classes, 120 methods, 46 properties
* Validated 37 classes, 121 methods, 46 properties
### Patching API for backends/wgpu_native/_api.py
* Validated 37 classes, 120 methods, 0 properties
## Validating backends/wgpu_native/_api.py
Expand Down

0 comments on commit 4930bee

Please sign in to comment.