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

op: test comparison sampling results and filtering #2072

Open
kainino0x opened this issue Dec 13, 2022 · 1 comment
Open

op: test comparison sampling results and filtering #2072

kainino0x opened this issue Dec 13, 2022 · 1 comment

Comments

@kainino0x
Copy link
Collaborator

Filtering+comparison is underspecified behavior but we can try to approximate tests.

Nonfiltering comparison should be well specified and we should make sure it has the expected behavior (see also texture_view,read)

@kainino0x kainino0x added this to CTS Jan 19, 2022
@kainino0x kainino0x converted this from a draft issue Dec 13, 2022
@greggman
Copy link
Contributor

greggman commented Jan 4, 2023

Just as an FYI, In October 2021, AMD on Metal had fairly different filtering than other devices

I wrote a test that put 0 in the first mip, 1 in the second, 0 in the 3rd etc...., then filtered between them and graphed the output. Here are the results. This was why the Metal backend on AMD does not pass the OpenGLES dEQP conformance tests related to filtering.

image

https://jsgist.org/?src=0d5618b35e26acf24191109f60ea87ce

At the time Apple responded with "that's intentional behavior for perf".

That may have changed since then but if it hasn't then it looks like the most you can assume is that sampling between 2 mips where t goes from 0 to 1 to select between mips a and b, that as t goes from 0 to 1, for any t' greater than t sampled value for t' will be closer b to **or equal** to the sampled value for t

If it's useful, a standalone Swift based metal app to test the values is here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Open (no TODO)
Development

No branches or pull requests

4 participants
@greggman @kainino0x @lokokung and others