-
Notifications
You must be signed in to change notification settings - Fork 45
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
Error management in unconfigured Surface methods #255
Comments
Following the pattern of #225 and #115 (comment) I would propose we make wgpuSurfacePresent return a Another option would be to have present do nothing in this case as that is what would happen in a browser, when it "Present"s implicitly at the end of a frame. |
Jan 4 meeting:
We don't have WGPUStatus (or whatever it's going to be called) yet but it can be added anytime. |
Given that we have a |
WGPUSurfaceGetCurrentTextureStatus has more specific statuses, so if we did that we'd have to have another way to report those.
|
It's just a bit weird that there are multiple status enums when there is also a generic one that's just a two-value enum. But folding everything into a single enum also means that each entrypoint will have to say which subset of it is valid, and application will have to know that wgpu::Suboptimal is still a success. So staying as is seems fine. |
May 23 meeting (sorry for delay):
|
|
Actually I'm rereading the other notes on this issue and realizing that my position there doesn't make sense. We did say we would use WGPUStatus_Error for state errors in wgpuSurfacePresent():
That's fine though. Main point was that we didn't want to return two possibly-conflicting status enums, and that constraint is best satisfied by using WGPUSurfaceGetCurrentTextureStatus to indicate both types of error. |
Fixes webgpu-native#255 Fixes (again?) webgpu-native#291
Fixes webgpu-native#255 Fixes (again?) webgpu-native#291 Issue webgpu-native#225
Fixes webgpu-native#255 Fixes (again?) webgpu-native#291 Issue webgpu-native#225 Fixes webgpu-native#64
Fixes webgpu-native#255 Fixes (again?) webgpu-native#291 Issue webgpu-native#225 Fixes webgpu-native#64
Fixes webgpu-native#255 Fixes (again?) webgpu-native#291 Issue webgpu-native#225 Fixes webgpu-native#64
A
Surface
object is created from anInstance
, so it has no associatedDevice
by default, until itsConfigure
method gets called.However, the typical management of errors is done through the
Device
'sUncapturedErrorCallback
.So how should a
Surface
report an error when a method likePresent
is called before the surface was configured? This concern holds for all methods that were inherited from the formerSwapChain
object.The text was updated successfully, but these errors were encountered: