[Mesa-dev] [PATCH 5/5] i965 gen7: use SURFACE_STATE fields to select render level/layer

Eric Anholt eric at anholt.net
Mon May 27 20:51:25 PDT 2013


Jordan Justen <jljusten at gmail.com> writes:

> On Fri, May 24, 2013 at 2:17 PM, Paul Berry <stereotype441 at gmail.com> wrote:
>> On 22 May 2013 20:00, Jordan Justen <jljusten at gmail.com> wrote:
>>> On Wed, May 22, 2013 at 3:56 PM, Eric Anholt <eric at anholt.net> wrote:
>>> > Jordan Justen <jordan.l.justen at intel.com> writes:
>>> >> -   surf[0] = BRW_SURFACE_2D << BRW_SURFACE_TYPE_SHIFT |
>>> >> +   switch (gl_target) {
>>> >> +   case GL_TEXTURE_CUBE_MAP_ARRAY:
>>> >> +   case GL_TEXTURE_CUBE_MAP:
>>> >> +      surftype = BRW_SURFACE_2D;
>>> >> +      is_array = true;
>>> >> +      depth *= 6;
>>> >> +      break;
>>> >> +   default:
>>> >> +      surftype = translate_tex_target(gl_target);
>>> >> +      is_array = _mesa_tex_target_is_array(gl_target);
>>> >> +      break;
>>> >> +   }
>>> >
>>> > Why the conversion of cubes to arrays?  It looks from mentions in the
>>> > "render target write" message section's mention of RTAI that cubes are
>>> > supported.
>>>
>>> Hmm. Good catch.
>>>
>>> I think I started implementing this in brw_wm_surface_state.c, so I
>>> was looking at what would be needed for the older gens. It looks like
>>> pre-gen6, that cube-arrays were not supported in the surface_state.
>>> I'm not sure right now why I extended that to include converting
>>> non-array cubes to 2d-arrays as well.
>>>
>>> Anyway, I'll investigate cleaning this up for gen7, since that is what
>>> we are starting with.
>>
>> When Jordan was first working on this feature, he asked me to help debug it,
>> and I found by reading simulator source code that SURFACE_STATE's "minimum
>> array element" field is ignored for cube surfaces (in direct contradiction
>> to the hw docs). Fortunately, treating the surface as an array is an
>> effective workaround, since for render targets there is effectively no
>> difference between a cube map and an ordinary array with a 6x higher depth.
>
> I guess I forgot this discussion of ours. I spent some time trying to
> get BRW_SURFACE_CUBE working (again, I suppose), with no luck.
>
> Anyway...
>
> Either of you good for an r-b on this second version of patch 5 in
> this series then?

Yeah, gets my r-b.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130527/98dcc269/attachment.pgp>


More information about the mesa-dev mailing list