Skip to content

Conversation

@greggman
Copy link
Contributor

Added some tests as a follow up to #4498

This turned into a bigger change than just fixing the typo.
With the typo fixed, a bunch of tests started failing.
One issue in particular is that out of bounds `textureLoad`
needs to take swizzle into account since its allowed to
return any value inside the texture. I'm making the assuption
that the spec would say it can return any swizzled value in
the texture.

This comes up with depth textures because if texture-component-swizzle
is enabled then we check RGBA for depth textures instead of just R
and we expcet GBA to be 001. Before this change, if the texel address
was invalid we'd get a texel from the software texture and GBA would
be wrong and so no texels would match.

Theoretically, with this change, the software sampler code supports
swizzles but, that path is not really be exercised. Only the fact that
depth textures go from R??? to R001 is used.
This is just a basic test. Other tests that
would be good.

* test with sampler and linear filtering
* test cube maps
* test gather

All of these take different paths through
softwareTextureRead. It's unlikely they
are broken. I just wanted to check the code
takes swizzle into account as that path is
currently unused anywhere else.

For now, it just seemed to be good to try
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.

1 participant