GPURenderPassEncoder: phương thức insertDebugMarker()
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 GPURenderPassEncoder đánh dấu một điểm cụ thể trong một loạt các lệnh kết xuất đã được mã hóa bằng một nhãn.
Phương thức này có thể được dùng cho mục đích thu thập dữ liệu telemetry, hoặc có thể được sử dụng trong các thông báo GPUError, công cụ phát triển trình duyệt, hoặc các dịch vụ khác trong tương lai để hỗ trợ gỡ lỗi.
Cú pháp
js
insertDebugMarker(markerLabel)
Tham số
markerLabel-
Một chuỗi biểu diễn nhãn cần chèn.
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> |