Skip to content

Commit 584c9d7

Browse files
bors[bot]kvark
andauthored
Merge #509
509: Bug 1614703 - WebGPU render pipeline creation r=jgilbert,webidl,baku r=gecko a=kvark Differential Revision: https://phabricator.services.mozilla.com/D64833 [ghsync] From https://hg.mozilla.org/mozilla-central/rev/e01862df6ba32a18826fe6c2e38e4a57dad3e338 Co-authored-by: Dzmitry Malyshau <[email protected]>
2 parents 40889df + cfe000c commit 584c9d7

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

wgpu-remote/src/lib.rs

+14
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,20 @@ pub extern "C" fn wgpu_client_kill_compute_pipeline_id(
443443
.free(id)
444444
}
445445

446+
#[no_mangle]
447+
pub extern "C" fn wgpu_client_make_render_pipeline_id(
448+
client: &Client,
449+
device_id: id::DeviceId,
450+
) -> id::RenderPipelineId {
451+
let backend = device_id.backend();
452+
client
453+
.identities
454+
.lock()
455+
.select(backend)
456+
.render_pipelines
457+
.alloc(backend)
458+
}
459+
446460
#[no_mangle]
447461
pub extern "C" fn wgpu_client_kill_render_pipeline_id(
448462
client: &Client,

wgpu-remote/src/server.rs

+10
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,16 @@ pub extern "C" fn wgpu_server_compute_pipeline_destroy(
327327
gfx_select!(self_id => global.compute_pipeline_destroy(self_id));
328328
}
329329

330+
#[no_mangle]
331+
pub extern "C" fn wgpu_server_device_create_render_pipeline(
332+
global: &Global,
333+
self_id: id::DeviceId,
334+
desc: &core::pipeline::RenderPipelineDescriptor,
335+
new_id: id::RenderPipelineId,
336+
) {
337+
gfx_select!(self_id => global.device_create_render_pipeline(self_id, desc, new_id));
338+
}
339+
330340
#[no_mangle]
331341
pub extern "C" fn wgpu_server_render_pipeline_destroy(
332342
global: &Global,

0 commit comments

Comments
 (0)