GPUDevice: phương thức createCommandEncoder()

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 createCommandEncoder() của giao diện GPUDevice tạo một GPUCommandEncoder, được dùng để mã hóa các lệnh sẽ được gửi tới GPU.

Cú pháp

js
createCommandEncoder(descriptor)

Tham số

descriptor Optional

Đối tượng mô tả bộ mã hóa lệnh cần tạo.

Giá trị trả về

Một thể hiện GPUCommandEncoder.

Đặc tả

Specification
WebGPU
# dom-gpudevice-createcommandencoder

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