Interface GPUCompilationMessage

    interface GPUCompilationMessage {
        __brand: "GPUCompilationMessage";
        length: number;
        lineNum: number;
        linePos: number;
        message: string;
        offset: number;
        type: GPUCompilationMessageType;
    }

    Properties

    __brand: "GPUCompilationMessage"
    length: number

    The number of UTF-16 code units in the substring that GPUCompilationMessage#message corresponds to. If the message does not correspond with a substring then GPUCompilationMessage#length must be 0.

    lineNum: number

    The line number in the shader GPUShaderModuleDescriptor#code the GPUCompilationMessage#message corresponds to. Value is one-based, such that a lineNum of 1 indicates the first line of the shader GPUShaderModuleDescriptor#code. Lines are delimited by line breaks. If the GPUCompilationMessage#message corresponds to a substring this points to the line on which the substring begins. Must be 0 if the GPUCompilationMessage#message does not correspond to any specific point in the shader GPUShaderModuleDescriptor#code.

    linePos: number

    The offset, in UTF-16 code units, from the beginning of line GPUCompilationMessage#lineNum of the shader GPUShaderModuleDescriptor#code to the point or beginning of the substring that the GPUCompilationMessage#message corresponds to. Value is one-based, such that a GPUCompilationMessage#linePos of 1 indicates the first code unit of the line. If GPUCompilationMessage#message corresponds to a substring this points to the first UTF-16 code unit of the substring. Must be 0 if the GPUCompilationMessage#message does not correspond to any specific point in the shader GPUShaderModuleDescriptor#code.

    message: string

    The human-readable, localizable text for this compilation message. Note: The GPUCompilationMessage#message should follow the best practices for language and direction information. This includes making use of any future standards which may emerge regarding the reporting of string language and direction metadata.

    Editorial note: At the time of this writing, no language/direction recommendation is available that provides compatibility and consistency with legacy APIs, but when there is, adopt it formally.

    offset: number

    The offset from the beginning of the shader GPUShaderModuleDescriptor#code in UTF-16 code units to the point or beginning of the substring that GPUCompilationMessage#message corresponds to. Must reference the same position as GPUCompilationMessage#lineNum and GPUCompilationMessage#linePos. Must be 0 if the GPUCompilationMessage#message does not correspond to any specific point in the shader GPUShaderModuleDescriptor#code.

    The severity level of the message. If the GPUCompilationMessage#type is GPUCompilationMessageType#"error", it corresponds to a shader-creation error.