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

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 createComputePipeline() của giao diện GPUDevice tạo một GPUComputePipeline có thể điều khiển giai đoạn compute shader và được dùng trong GPUComputePassEncoder.

Cú pháp

js
createComputePipeline(descriptor)

Tham số

descriptor

Đối tượng mô tả pipeline tính toán cần tạo.

Giá trị trả về

Một thể hiện GPUComputePipeline.

Đặc tả

Specification
WebGPU
# dom-gpudevice-createcomputepipeline

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