Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Sep 16, 2024
1 parent e042000 commit 671cd4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
14 changes: 12 additions & 2 deletions wgpu/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,17 @@ def configure(
if self._surface_info["method"] == "screen":
self._configure_screen(**self._config)

def _configure_screen(self, **kwargs):
def _configure_screen(
self,
*,
device,
format,
usage,
view_formats,
color_space,
tone_mapping,
alpha_mode,
):
raise NotImplementedError()

# IDL: undefined unconfigure();
Expand All @@ -354,7 +364,7 @@ def unconfigure(self):
self._config = None
self._drop_texture()

def _unconfigure_screen(self, **kwargs):
def _unconfigure_screen(self):
raise NotImplementedError()

# IDL: GPUTexture getCurrentTexture();
Expand Down
14 changes: 7 additions & 7 deletions wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,13 +508,13 @@ def _get_capabilities_screen(self, adapter):
def _configure_screen(
self,
*,
device: "GPUDevice",
format: "enums.TextureFormat",
usage: "flags.TextureUsage" = 0x10,
view_formats: "List[enums.TextureFormat]" = [],
color_space: str = "srgb",
tone_mapping: "structs.CanvasToneMapping" = {},
alpha_mode: "enums.CanvasAlphaMode" = "opaque",
device,
format,
usage,
view_formats,
color_space,
tone_mapping,
alpha_mode,
):

capabilities = self._get_capabilities(device.adapter)
Expand Down
4 changes: 2 additions & 2 deletions wgpu/resources/codegen_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
* 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, 112 methods, 45 properties
* Validated 37 classes, 121 methods, 45 properties
### Patching API for backends/wgpu_native/_api.py
* Validated 37 classes, 112 methods, 0 properties
* Validated 37 classes, 108 methods, 0 properties
## Validating backends/wgpu_native/_api.py
* Enum field FeatureName.texture-compression-bc-sliced-3d missing in wgpu.h
* Enum field FeatureName.clip-distances missing in wgpu.h
Expand Down

0 comments on commit 671cd4a

Please sign in to comment.