@nextcloud/dialogs
    Preparing search index...

    Interface GPU

    The GPU interface of the WebGPU API is the starting point for using WebGPU. It can be used to return a GPUAdapter from which you can request devices, configure features and limits, and more. Available only in secure contexts.

    MDN Reference

    interface GPU {
        wgslLanguageFeatures: WGSLLanguageFeatures;
        getPreferredCanvasFormat(): GPUTextureFormat;
        requestAdapter(
            options?: GPURequestAdapterOptions,
        ): Promise<GPUAdapter | null>;
    }
    Index

    Properties

    wgslLanguageFeatures: WGSLLanguageFeatures

    The wgslLanguageFeatures read-only property of the GPU interface returns a WGSLLanguageFeatures object that reports the WGSL language extensions supported by the WebGPU implementation.

    MDN Reference

    Methods

    • The getPreferredCanvasFormat() method of the GPU interface returns the optimal canvas texture format for displaying 8-bit depth, standard dynamic range content on the current system.

      MDN Reference

      Returns GPUTextureFormat

    • The requestAdapter() method of the GPU interface returns a Promise that fulfills with a GPUAdapter object instance. From this you can request a GPUDevice, adapter info, features, and limits.

      MDN Reference

      Parameters

      Returns Promise<GPUAdapter | null>