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

Rename deprecated texture info functions and add new ones. #4192

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

greggman
Copy link
Contributor

This is a step to fixing the tests so they test all optional texture formats.

Note: I couldn't figure out how to share the code in validation_test.ts without bigger changes throught the code base. Maybe that can come in another PR.

The issue is, the rest of the code base expects that ValidationTest is a class which means you do this

function foo(t: ValidationTest) { ... }
foo(new ValidationTest());

Things like the Mixin pattern don't support this as the thing returned is at best a constructor but not a type. Hopefully this can be solved later.

Note that only format_info.ts, gpu_test.ts, test_config.ts, validation_test.ts
were edited directly. The rest are changed via VSCode's rename refactor functions.

Issue: #4181

This is a step to fixing the tests so they test all optional
texture formats.

Note: I couldn't figure out how to share the code in
validation_test.ts without bigger changes throught the code
base. Maybe that can come in another PR.

The issue is, the rest of the code base expects that ValidationTest
is a class which means you do this

    function foo(t: ValidationTest) { ... }
    foo(new ValidationTest());

Things like the Mixin pattern don't support this as the thing
returned is at best a constructor but not a type. Hopefully
this can be solved later.
@greggman greggman requested a review from kainino0x February 20, 2025 00:25
@greggman
Copy link
Contributor Author

ran with dawn.node just the webgpu:api,* branch. Same pass/fail/skip numbers before and after this change.

@kainino0x
Copy link
Collaborator

kainino0x commented Feb 20, 2025

Things like the Mixin pattern don't support this as the thing returned is at best a constructor but not a type. Hopefully this can be solved later.

Might be able to do typeof new ValidationTest() / typeof new (SomeMixin(GPUTest))() or something but I'm not sure if that works

@greggman greggman merged commit 5d70ace into gpuweb:main Feb 20, 2025
1 check passed
@greggman greggman deleted the deprecate-texture-functions branch February 20, 2025 17:25
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