Skip to content

Add 7 new difftests and push constants support #321

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LegNeato
Copy link
Collaborator

@LegNeato LegNeato commented Jul 4, 2025

I wanted to increase coverage, so I worked with AI to bang out some tests and infra changes.

New tests:

  • bitwise_ops: bit manipulation operations
  • trig_ops: trigonometric functions
  • control_flow_complex: nested loops and complex control flow
  • vector_swizzle: vector component access and swizzling
  • memory_barriers: workgroup memory synchronization
  • vector_extract_insert: dynamic vector element access
  • push_constants: push constants in compute shaders

Infrastructure changes:

  • Add WgpuComputeTestPushConstants for push constant support
  • Enable PUSH_CONSTANTS feature in wgpu when needed

New tests:
- bitwise_ops: bit manipulation operations
- trig_ops: trigonometric functions
- control_flow_complex: nested loops and complex control flow
- vector_swizzle: vector component access and swizzling
- memory_barriers: workgroup memory synchronization
- vector_extract_insert: dynamic vector element access
- push_constants: push constants in compute shaders

Infrastructure changes:
- Add WgpuComputeTestPushConstants for push constant support
- Enable PUSH_CONSTANTS feature in wgpu when needed
- Register all existing unregistered tests in workspace
@Firestar99
Copy link
Member

I'd love to have these for testing my const folding in #317

@Firestar99
Copy link
Member

CI Ubuntu reports these failures:
difftests::lang::core::ops::math_ops
difftests::lang::core::ops::matrix_ops
difftests::lang::core::ops::vector_ops

On my machine I get these failures:
difftests::lang::core::ops::math_ops
difftests::lang::core::ops::matrix_ops

Could this be float inaccuracies between vendors?

@LegNeato
Copy link
Collaborator Author

LegNeato commented Jul 4, 2025

Yeah, I think it is floats because they all passed locally after I took care of some existing float issues. I'll take a look and either round or omit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants