[Mesa-dev] sampler objects and texture rectangles
Marek Olšák
maraeo at gmail.com
Sat Aug 2 03:11:36 PDT 2014
Yeah, I think you're right. Both Mesa and the test are incorrect.
Marek
On Sat, Aug 2, 2014 at 6:31 AM, Roland Scheidegger <sroland at vmware.com> wrote:
> I've discovered by accident that the mesa state tracker is trying to use
> REPEAT wrap mode with texture rectangles - this happens with piglit
> tex-miplevel-selection texture() 2DRectShadow -fbo -auto for instance
> though I guess others as well. Needless to say the test fails in
> llvmpipe because I was lazy and didn't make repeat wrap mode work with
> non-normalized coords (ok it's quite possible actually the test fails
> due to a completely unrelated reason but this just seems bogus).
> This would happen at least with any gallium based driver, but I wonder
> who's fault this really is. The problem here seems to be that while
> texture objects get initialized correctly for texture rectangles to
> CLAMP_TO_EDGE, sampler_objects do not (and since they aren't tied to a
> target, I guess they cannot be correctly initialized).
>
> Now after some digging, there's actually some bit in the spec about
> exactly this case in the section about sampler objects: "If state is
> present in a sampler object bound to a texture unit that would have
> been rejected by a call to TexParameter* for the texture bound to that
> unit, the behavior of the implementation is as if the texture were
> incomplete. For example, if TEXTURE_WRAP_S or TEXTURE_WRAP_T is set to
> REPEAT, MIRRORED_REPEAT, or MIRROR_CLAMP_TO_EDGE on the sampler object
> bound to a texture unit and the texture bound to that unit is a
> rectangle texture, the texture will be considered incomplete."
>
> So my guess is this isn't actually supposed to work and the test is
> bogus? It also looks like it isn't treated in mesa as incomplete.
>
> Roland
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list