[Mesa-dev] gallium and ARB_texture_query_levels

Roland Scheidegger sroland at vmware.com
Mon Feb 24 08:35:19 PST 2014


Am 24.02.2014 09:38, schrieb Dave Airlie:
> I've taken a quick look at ARB_texture_query_levels,
> 
> and the HW generally seems to implement this by returning it in the W
> channel of RESINFO, which would map to the TXQ instruction,
> 
> So my initial implementation added a LEVQ TGSI instruction but I do
> think this isn't representative of the hw and I should add it to TXQ
> with maybe a CAP to say it supports levels.
> 
> Dave.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/mesa-dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=F4msKE2WxRzA%2BwN%2B25muztFm5TSPwE8HKJfWfR2NgfY%3D%0A&m=5d7NG60G1rh6MNbfSxLGJ6BP279NlasrWRKYXmIL1rA%3D%0A&s=3d194a0f62820a267c7954a144cc78ebcca134ea4e9c1d3cb6e3c7aafe6678bb
> 

Doing this with TXQ sounds right to me. I'm not sure you even need a cap
bit - this is typically dx10 hw which can do resinfo and dx10 is the
reason all hw returns number of levels in the w channel anyway.
Though it's possible there's some newer non-desktop hw out there not
concerned about d3d (but OpenGL ES instead) which can't do it, so a cap
is fine too.
llvmpipe actually right now will only return this in the w channel for
sviewinfo, not txq, but it could be changed. I think as long as you give
it the right write mask it should be able to drop all the extra unneeded
calculations. Though obviously for llvmpipe/softpipe it can be
implemented easily either way.

Roland


More information about the mesa-dev mailing list