-
Notifications
You must be signed in to change notification settings - Fork 962
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
fix cts_runner #6840
base: trunk
Are you sure you want to change the base?
fix cts_runner #6840
Conversation
Please fix your commits to only include the changed lines, otherwise this is impossible to review. |
0b458b4
to
e8164d1
Compare
sorry for messy diff - still drafting pr. will mark as 'ready' soon |
state = |state| { | ||
state.put(Permissions {}); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions must be available in state before bootstrap. for cts_runner it's static, so i moved it here into the extension macro.
@@ -32,7 +32,7 @@ pub fn op_webgpu_compute_pass_set_pipeline( | |||
.get::<WebGpuComputePass>(compute_pass_rid)?; | |||
|
|||
state | |||
.borrow::<wgpu_core::global::Global>() | |||
.borrow::<super::Instance>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super::Instance
wraps a wgpu_core::global::Global
and is also actually present in the runtime state. it's used in locations that continued to pass tests after 77a83fb and using it consistently seems to correct the test panics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
several op functions in command_encoder, render_pass, and compute_pass use some gfx_ok
and gfx_put
macros.
i didn't add or remove any calls, but i noticed use seems to have become more inconsistent over time.
/// Color write mask. Disabled color channels will not be written to. | ||
/// | ||
/// Corresponds to [WebGPU `GPUColorWriteFlags`]( | ||
/// https://gpuweb.github.io/gpuweb/#typedefdef-gpucolorwriteflags). | ||
#[repr(transparent)] | ||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[cfg_attr(feature = "serde", serde(transparent))] | ||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | ||
pub struct ColorWrites(u32); | ||
|
||
bitflags::bitflags! { | ||
/// Color write mask. Disabled color channels will not be written to. | ||
/// | ||
/// Corresponds to [WebGPU `GPUColorWriteFlags`]( | ||
/// https://gpuweb.github.io/gpuweb/#typedefdef-gpucolorwriteflags). | ||
#[repr(transparent)] | ||
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] | ||
#[cfg_attr(feature = "serde", serde(transparent))] | ||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] | ||
pub struct ColorWrites: u32 { | ||
impl ColorWrites: u32 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bitflags macro and serde macros seem to be sensitive to ordering.
previously, the generated deserializer would expect a javascript string, but it's clearly a numeric type.
e8164d1
to
823be2d
Compare
@@ -195,14 +193,15 @@ pub fn op_webgpu_render_pass_execute_bundles( | |||
#[serde] | |||
pub fn op_webgpu_render_pass_end( | |||
state: &mut OpState, | |||
#[smi] _command_encoder_rid: ResourceId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this parameter is unused in this function, but it is part of the denoland implementation of deno_webgpu, and it's expected to be present by 01_webgpu.js
in this repository
Lines 3867 to 3870 in 61b7063
const { err } = op_webgpu_render_pass_end( | |
commandEncoderRid, | |
renderPassRid, | |
); |
@@ -91,14 +91,15 @@ pub fn op_webgpu_compute_pass_dispatch_workgroups_indirect( | |||
#[serde] | |||
pub fn op_webgpu_compute_pass_end( | |||
state: &mut OpState, | |||
#[smi] _command_encoder_rid: ResourceId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this parameter is unused in this function, but it is part of the denoland implementation of deno_webgpu, and it's expected to be present by 01_webgpu.js
in this repository
Lines 4383 to 4386 in 61b7063
const { err } = op_webgpu_compute_pass_end( | |
commandEncoderRid, | |
computePassRid, | |
); |
uncertain how to add this to the changelog. by intent, this is just fixing internal tools. practically, i think the state management changes and the parameter changes probably fixed some real outwards issues, but i haven't looked for examples. |
You can add it to the |
(Approved wgpu side) |
Connections
#6839
plus two more issues, revealed after the above issue was fixed.
Description
cts_runner could not execute conformance tests due to broken deno state management.
this pr restores the functionality of cts_runner, by
state.borrow::<super::Instance>()
instead ofstate.borrow::<wgpu_core::global::Global>()
, which is not presentTesting
cts_runner can now be manually executed.
i've been using a script to execute tests, adapted from the deleted
cts.yml
workflowcts_runner/cts.sh
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.