Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Sep 9, 2024
1 parent 4505f0b commit 7303636
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def _get_surface_capabilities(self, adapter):
formats.append(enum_int2str["TextureFormat"][int_val])

else:
capabilities["formats"] = list(wgpu.TextureFormat) # all
capabilities["formats"] = list(enums.TextureFormat) # all
capabilities.insert(0, "bgra8unorm-srgb") # prefer good default

if c_capabilities.alphaModes:
Expand All @@ -749,7 +749,7 @@ def _get_surface_capabilities(self, adapter):
str_val = enum_int2str["CompositeAlphaMode"][int_val]
alpha_modes.append(str_val.lower())
else:
capabilities["alpha_modes"] = list(wgpu.CanvasAlphaMode)
capabilities["alpha_modes"] = list(enums.CanvasAlphaMode)

if c_capabilities.presentModes:
capabilities["present_modes"] = present_modes = []
Expand All @@ -758,8 +758,7 @@ def _get_surface_capabilities(self, adapter):
str_val = enum_int2str["PresentMode"][int_val]
present_modes.append(str_val.lower())
else:
d = wgpu.backends.wgpu_native._api.enum_int2str["PresentMode"]
capabilities["present_modes"] = list(d.values())
capabilities["present_modes"] = list(enum_int2str["PresentMode"].values())

# H: void f(WGPUSurfaceCapabilities surfaceCapabilities)
libf.wgpuSurfaceCapabilitiesFreeMembers(c_capabilities[0])
Expand Down

0 comments on commit 7303636

Please sign in to comment.