[Mesa-dev] st/mesa: support for 1D/2D texture arrays

Roland Scheidegger sroland at vmware.com
Fri Jan 28 07:41:57 PST 2011

Am 28.01.2011 16:08, schrieb Brian Paul:
> On 01/27/2011 01:57 PM, Christoph Bumiller wrote:
>> This doesn't work, you use pipe_resource.depth0 for the array size but
>> the gallium interface wants you to use pipe_resource.array_size.
>> Do we fix the state tracker or the interface ?
> Yeah, I messed up there.  I started fixing this last night but it's 
> quite a bit of work, actually.  OpenGL stores the array size as the 
> texture height or depth but gallium has a separate array_size field. 
> There's a lot of places where we do comparisons like st_width == 
> pipe_width that need to be fixed.  I got most of it worked out but I 
> ran out of time yesterday.

Yeah, it seemed appropriate to have a separate field for array_size (and
at that time less error prone due to having to change less existing
code). Transfers etc. however unify the 3rd dimension parameter (z/cube
face/array slice) hence it would be entirely possible to unify depth and
array_size in the resource struct into a single member too. Though using
the "first unused member" (height) for 1d arrays (like GL does)
definitely would look like a hack to me at the resource level.


More information about the mesa-dev mailing list