Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to latest webgpu headers #445

Closed
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2baea09
Update library to latest webgpu-native headers
PJB3005 Sep 19, 2024
0c60733
Update C examples to new headers
PJB3005 Sep 19, 2024
980c2ff
Fix WGPUBufferMapAsyncStatus tomfoolery
PJB3005 Sep 19, 2024
8f34e48
Fix macOS typos in examples
PJB3005 Sep 19, 2024
b36e558
Update headers again
PJB3005 Sep 27, 2024
a4626db
Update wgpu.h to match new flag scheme
PJB3005 Sep 27, 2024
a256544
Update headers again, WGPUStringView
PJB3005 Oct 2, 2024
8947cf2
Only specify major version for bitflags dependency
PJB3005 Oct 2, 2024
fe965c8
Remove redundant unsafe block
PJB3005 Oct 2, 2024
f5040ed
Start upgrading, try to use Box<ComputePass>
eliemichel Oct 13, 2024
2afb356
Switch to *mut for ComputePass and RenderPass
eliemichel Oct 13, 2024
2293063
Adapt C examples
eliemichel Oct 13, 2024
eaa44b1
Clean up dependencies to point to wgpu repo
eliemichel Oct 13, 2024
23d8907
Format code
eliemichel Oct 13, 2024
482bc24
Add wgpuGetInstanceFeatures stuff
PJB3005 Oct 19, 2024
8f80a2c
I forgot to cargo fmt again
PJB3005 Oct 19, 2024
77dfe52
Implement "NotUsed" bind group entry types
PJB3005 Oct 19, 2024
3c3c292
Update to new undefined enums
PJB3005 Oct 20, 2024
aa6b617
Update for other enum changes
PJB3005 Oct 20, 2024
2cb389b
Update for new header features
PJB3005 Oct 20, 2024
b6b6903
Fix getFeatures chained struct handling.
PJB3005 Oct 20, 2024
4d49d7f
Flatten limits structures
PJB3005 Oct 20, 2024
24ec452
Merge remote-tracking branch 'upstream/trunk' into 24-09-19-update-he…
PJB3005 Oct 20, 2024
620405f
Some day I will learn to run cargo fmt and check compile before merges
PJB3005 Oct 20, 2024
ab33119
Merge branch 'trunk' into eliemichel/2024-10-14-upgrade-wgpu
eliemichel Oct 20, 2024
2d1888b
Upgrade timestamp functions
eliemichel Oct 20, 2024
e81dd63
Fix push_constant example
eliemichel Oct 20, 2024
76df580
Upgrade to what is almost wgpu 23.0.0
eliemichel Oct 27, 2024
ecc0266
Upgrade to official v23.0.0
eliemichel Nov 12, 2024
e36359f
Upgrade to latest webgpu.h
eliemichel Nov 12, 2024
6eb8945
Add missing unimplemented symbols
eliemichel Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Upgrade timestamp functions
eliemichel committed Oct 20, 2024
commit 2d1888ba20d7888e0ee8561059e8509a7679afcb
25 changes: 18 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -4189,7 +4189,8 @@ pub unsafe extern "C" fn wgpuDeviceCreateShaderModuleSpirV(
descriptor.source,
descriptor.sourceSize as usize,
));
let (shader_module_id, error) = gfx_select!(device_id => context.device_create_shader_module_spirv(device_id, &desc, source, None));
let (shader_module_id, error) =
context.device_create_shader_module_spirv(device_id, &desc, source, None);
if let Some(cause) = error {
handle_error(
error_sink,
@@ -4240,9 +4241,13 @@ pub unsafe extern "C" fn wgpuComputePassEncoderSetPushConstants(
data: *const u8,
) {
let pass = pass.as_ref().expect("invalid compute pass");
let encoder = pass.encoder.as_mut().unwrap();
let encoder = pass.encoder.as_mut().expect("invalid compute pass encoder");

match encoder.set_push_constants(&pass.context, offset, make_slice(data, size_bytes as usize)) {
match pass.context.compute_pass_set_push_constants(
encoder,
offset,
make_slice(data, size_bytes as usize),
) {
Ok(()) => (),
Err(cause) => handle_error(
&pass.error_sink,
@@ -4467,9 +4472,12 @@ pub unsafe extern "C" fn wgpuComputePassEncoderWriteTimestamp(
) {
let pass = pass.as_ref().expect("invalid compute pass");
let query_set_id = query_set.as_ref().expect("invalid query set").id;
let encoder = pass.encoder.as_mut().unwrap();
let encoder = pass.encoder.as_mut().expect("invalid compute pass encoder");

match encoder.write_timestamp(&pass.context, query_set_id, query_index) {
match pass
.context
.compute_pass_write_timestamp(encoder, query_set_id, query_index)
{
Ok(()) => (),
Err(cause) => handle_error(
&pass.error_sink,
@@ -4488,9 +4496,12 @@ pub unsafe extern "C" fn wgpuRenderPassEncoderWriteTimestamp(
) {
let pass = pass.as_ref().expect("invalid render pass");
let query_set_id = query_set.as_ref().expect("invalid query set").id;
let encoder = pass.encoder.as_mut().unwrap();
let encoder = pass.encoder.as_mut().expect("invalid compute pass encoder");

match encoder.write_timestamp(&pass.context, query_set_id, query_index) {
match pass
.context
.render_pass_write_timestamp(encoder, query_set_id, query_index)
{
Ok(()) => (),
Err(cause) => handle_error(
&pass.error_sink,