[Mesa-dev] [PATCH 3/3] softpipe: enable ARB_texture_view
sroland at vmware.com
Tue May 12 20:12:59 PDT 2015
Am 13.05.2015 um 04:45 schrieb Ilia Mirkin:
> On Tue, May 12, 2015 at 10:36 PM, <sroland at vmware.com> wrote:
>> From: Roland Scheidegger <sroland at vmware.com>
>> Some bits were already there for texture views but some were missing.
>> In particular for cube map views things needed to change a bit.
>> For simplicity I ended up removing the separate face addr bit (just use
>> the z bit) - cube arrays didn't use it already, so just follow the same
>> logic there. (In theory using separate bits could allow for better hash
>> function but I don't think anyone ever did some measurements of that so
>> probably not worth the trouble, if we'd reintroduce it we'd certainly
>> wanted to use the same logic for cube arrays and cube maps.)
>> Also extend the seamless cube sampling to cube arrays - as there were no
>> piglit failures before this is apparently untested, but things now generally
>> work quite the same for cube textures and cube array textures so there
>> hopefully shouldn't be any trouble...
>> 49 new piglits, 47 pass, 2 fail (both due to fake multisampling).
>> docs/GL3.txt | 2 +-
>> src/gallium/drivers/softpipe/sp_screen.c | 3 +-
>> src/gallium/drivers/softpipe/sp_state_sampler.c | 12 +-
>> src/gallium/drivers/softpipe/sp_tex_sample.c | 243 +++++++++++++----------
>> src/gallium/drivers/softpipe/sp_tex_tile_cache.c | 11 +-
>> src/gallium/drivers/softpipe/sp_tex_tile_cache.h | 4 +-
>> 6 files changed, 150 insertions(+), 125 deletions(-)
>> diff --git a/docs/GL3.txt b/docs/GL3.txt
>> index 5590fea..32b7809 100644
>> --- a/docs/GL3.txt
>> +++ b/docs/GL3.txt
>> @@ -169,7 +169,7 @@ GL 4.3, GLSL 4.30:
>> GL_ARB_texture_buffer_range DONE (nv50, nvc0, i965, r600, radeonsi, llvmpipe)
>> GL_ARB_texture_query_levels DONE (all drivers that support GLSL 1.30)
>> GL_ARB_texture_storage_multisample DONE (all drivers that support GL_ARB_texture_multisample)
>> - GL_ARB_texture_view DONE (i965, nv50, nvc0)
>> + GL_ARB_texture_view DONE (i965, nv50, nvc0, llvmpipe)
>> GL_ARB_vertex_attrib_binding DONE (all drivers)
> Trivial comments:
> (a) this probably belongs in the llvmpipe change, and you can add softpipe here
ok. I was lazy.
> (b) may be a good idea to update the relnotes as well
Ah yes I forgot that.
> I did the original texture view enablement in gallium, and it really
> should be as simple as looking in view->target instead of res->target.
> Surprised that these changes were so large.
Well that's true for casting arrays to cube maps (and pretty much the
only thing the llvmpipe patch does, apart from the debug stuff).
Softpipe, however, could not handle first_layer for arrays not starting
at zero neither (not that any of the piglit tests actually test this
unfortunately, I know it works in llvmpipe but I haven't run these other
tests on softpipe...). Not to mention it similarly assumed cube layers
starting at zero (this is at least tested by piglit) etc. Plus lots of
duplication due to having separate sampling functions for everything.
The first_layer/last_layer issue is really more complex to implement
than just the resource casting (though the latter ended up being quite
some trivial changes too, hook up different sampling functions etc.).
non-zero first_level at least was already implemented.
I guess if you have real hw you can just set the first_layer/last_layer
bit somewhere and forget about it :-).
More information about the mesa-dev