-
Notifications
You must be signed in to change notification settings - Fork 88
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
Refactor format_info.ts and related texture functions #4181
Comments
|
|
I was planning to split the format info into two separate tables, one for static info (like block sizes) and one for dynamic info (capabilities) that could depend on the device, but I never got around to that after doing the first step of the refactor. I think #3848 was the issue tracking that. |
Also expanded the multisample depth test and add multisample stencil placeholder. Issue: gpuweb#4181
Also expanded the multisample depth test and add multisample stencil placeholder. Issue: gpuweb#4181
Also expanded the multisample depth test and add multisample stencil placeholder. Issue: #4181
Also expanded the multisample depth test and add multisample stencil placeholder. Issue: gpuweb#4181
The CTS has the issue that there's a global table of texture data
kAllTextureFormatInfo
and it's often used to filter/select formats. ExampleBut this is wrong.
rg11b10ufloat
is conditionally renderable so as defined it will never be tested here.Similarly there is code like this
This is also wrong.
rg11b10ufloat
is marked asmultisample: false
but enablingrg11b10ufloat-renderable
is supposed to make it support multisampling which means, every test using this filter will not be testing this format so we'd have no idea if it actually works.It feels like this should be solved by making
kAllTextureFormatInfo
private and refactoring any of these queries about formats to require enough info to be useful, and/or, be renamed to reflect what they're returning. So for example, something that wants to know all renderable formats can not usebecause, you can't know if a format is renderable until you know if you have the feature. That particular function could be renamed to
canPotentiallyUseAsRenderTarget
in which case it should return true forrg11b10ufloat
. SimilarlyisMultisampledTextureFormat
would need to beisPotentiallyMultisampledTextureFormat
.But ultimately, with all of these special exceptions, it doesn't feel like tests should be rolling their own checks by accessing
kAllTextureFormatInfo
directly. They should all be gated on the data needed to give the correct answer, forcing you to get the larger list and then useskipIf...
and/orselectDeviceForXOrSkipTest
I think I'd also suggest that most texture format filtering in general should be moved to some helpers that tests all share the same filtering where appropriate.
@shrekshao, @kainino0x
The text was updated successfully, but these errors were encountered: