Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions for WGPUSurface #295

Closed
Kangz opened this issue May 22, 2024 · 2 comments
Closed

Questions for WGPUSurface #295

Kangz opened this issue May 22, 2024 · 2 comments

Comments

@Kangz
Copy link
Collaborator

Kangz commented May 22, 2024

Should a WGPUTextureUsage be added to WGPUSurfaceCapabilities with guarantees like RENDER_ATTACHMENT|TEXTURE_BINDING|COPY_SRC|COPY_DST?

Where do errors go when there is no configured device on the surface? When exactly does that configure device change (unconfigure, failed calls to configure when there is already a configured device, etc). Are failures reflected in a status enum for things not linked to a device?

Is the following defined to always work without additional waits? At least on Vulkan and D3D12 it will require waiting for the GPU on WGPUSurfaceRelease:

surface = wgpuInstanceCreateSurface(sameParams);
wgpuSurfaceConfigure(surface, ...);
wgpuSurfaceRelease(surface);

surface2 = wgpuInstanceCreateSurface(sameParams);

What do we do with the extensibility and the status of GetCurrentTexture? How do we notify that a surface has been lost?

@austinEng
Copy link
Collaborator

maybe merge these questions into #24 ?

for errors - see #255. I believe the resolution is to return a WGPUStatus with implementation-defined logging

for surface lost, there is WGPUSurfaceGetCurrentTextureStatus_Lost when you getCurrentTexture

for extensibility - see #261

@Kangz
Copy link
Collaborator Author

Kangz commented May 22, 2024

Thank, closing in favor of these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants