Skip to content

WGPUSurfaceGetCurrentTextureStatus needs a value for "surface not configured" #291

@kainino0x

Description

@kainino0x

There's just one error case in getCurrentTexture() in the JS spec:

  1. If this.[[configuration]] is null:
    1. Throw an InvalidStateError and stop.

We don't have a WGPUSurfaceGetCurrentTextureStatus to represent this currently.

typedef enum WGPUSurfaceGetCurrentTextureStatus {
    WGPUSurfaceGetCurrentTextureStatus_Success = 0x00000000,
    WGPUSurfaceGetCurrentTextureStatus_Timeout = 0x00000001,
    WGPUSurfaceGetCurrentTextureStatus_Outdated = 0x00000002,
    WGPUSurfaceGetCurrentTextureStatus_Lost = 0x00000003,
    WGPUSurfaceGetCurrentTextureStatus_OutOfMemory = 0x00000004,
    WGPUSurfaceGetCurrentTextureStatus_DeviceLost = 0x00000005,
    WGPUSurfaceGetCurrentTextureStatus_Force32 = 0x7FFFFFFF
} WGPUSurfaceGetCurrentTextureStatus WGPU_ENUM_ATTRIBUTE;

Should we add a new one, or merge with one of those?

Followup issue to #203. cc @rajveermalviya @Kangz @eliemichel

Metadata

Metadata

Assignees

No one assigned

    Labels

    has resolutionIssue is resolved, just needs to be donepresentationPresenting images to surfaces like windows and canvases

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions