Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Michel Dänzer
On 24.09.2014 14:01, Ilia Mirkin wrote: For 3d textures, NumLayers is set to 1, which is not what we want. This fixes the newly added gl-layer-render-storage test (which constructs immutable 3d textures). Fixes regression introduced in d82bd7eb060. Bugzilla:

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Marek Olšák
Maybe something similar also needs to be done for cubemaps, because they are just layered textures in disguise? Marek On Wed, Sep 24, 2014 at 7:01 AM, Ilia Mirkin imir...@alum.mit.edu wrote: For 3d textures, NumLayers is set to 1, which is not what we want. This fixes the newly added

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Ilia Mirkin
The disguise of cubemap's layeredness is insufficient to trip up this code :) They still get their NumLayers set, and the resources still have an array size. Perhaps there's a scenario I'm not considering? On Wed, Sep 24, 2014 at 5:23 AM, Marek Olšák mar...@gmail.com wrote: Maybe something

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Marek Olšák
Cubemaps have array_size == 1, but you can still set the target to 2D and set first_layer = last_layer = 6 in the sample view. Instead of checking array_size, maybe NumLayers should be used instead. Just guessing. Marek On Wed, Sep 24, 2014 at 5:05 PM, Ilia Mirkin imir...@alum.mit.edu wrote:

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Ilia Mirkin
On Wed, Sep 24, 2014 at 12:20 PM, Marek Olšák mar...@gmail.com wrote: Cubemaps have array_size == 1, but you can still set the target to 2D Are you *sure* about that? Everything I'm seeing indicates that cubemaps have array_size == 6. For example this code in nv50_tex.c: depth =

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Marek Olšák
Interesting, I didn't know about that. Nevermind. st/mesa indeed sets it to 6. Marek On Wed, Sep 24, 2014 at 6:26 PM, Ilia Mirkin imir...@alum.mit.edu wrote: On Wed, Sep 24, 2014 at 12:20 PM, Marek Olšák mar...@gmail.com wrote: Cubemaps have array_size == 1, but you can still set the target to

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Roland Scheidegger
Yes cubemaps should have array_size == 6 always in gallium. You just have to be careful whenever translating things from mesa to gallium as things like that won't be true in core mesa of course (similar to 1d array textures having height and so on) due to OpenGL weirdness for historical reasons.

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Ilia Mirkin
Marek/Roland -- do either of those comments count as a R-b? I'd like to push this out tonight, pending a full piglit run. On Wed, Sep 24, 2014 at 1:35 PM, Roland Scheidegger srol...@vmware.com wrote: Yes cubemaps should have array_size == 6 always in gallium. You just have to be careful

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Roland Scheidegger
I don't really qualified to review, IIRC I mentioned it was tricky to see if it's right when you pushed it first, and this has not changed. Some comment inline though... Am 24.09.2014 20:30, schrieb Ilia Mirkin: Marek/Roland -- do either of those comments count as a R-b? I'd like to push this

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Ilia Mirkin
On Wed, Sep 24, 2014 at 5:17 PM, Roland Scheidegger srol...@vmware.com wrote: I don't really qualified to review, IIRC I mentioned it was tricky to see if it's right when you pushed it first, and this has not changed. Some comment inline though... Am 24.09.2014 20:30, schrieb Ilia Mirkin:

Re: [Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-24 Thread Roland Scheidegger
Am 24.09.2014 23:23, schrieb Ilia Mirkin: On Wed, Sep 24, 2014 at 5:17 PM, Roland Scheidegger srol...@vmware.com wrote: I don't really qualified to review, IIRC I mentioned it was tricky to see if it's right when you pushed it first, and this has not changed. Some comment inline though...

[Mesa-dev] [PATCH] mesa/st: NumLayers is only valid for array textures

2014-09-23 Thread Ilia Mirkin
For 3d textures, NumLayers is set to 1, which is not what we want. This fixes the newly added gl-layer-render-storage test (which constructs immutable 3d textures). Fixes regression introduced in d82bd7eb060. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84145 Signed-off-by: Ilia Mirkin