GPUComputePassEncoder: insertDebugMarker() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

Phương thức insertDebugMarker() của giao diện GPUComputePassEncoder đánh dấu một điểm cụ thể trong chuỗi lệnh compute pass mã hóa bằng một nhãn.

Phương thức này có thể được dùng cho telemetry, hoặc trong tương lai có thể được sử dụng trong thông báo GPUError, dev tools của trình duyệt hoặc các dịch vụ khác để hỗ trợ gỡ lỗi.

Cú pháp

js
insertDebugMarker(markerLabel)

Tham số

markerLabel

Một chuỗi đại diện cho nhãn cần chèn vào.

Giá trị trả về

Không có (Undefined).

Ví dụ

js
// …

passEncoder.insertDebugMarker("my_marker");

// …

Thông số kỹ thuật

Specification
WebGPU
# dom-gpudebugcommandsmixin-insertdebugmarker

Tương thích trình duyệt

Xem thêm