[Mesa-dev] [PATCH 5/5] i965 gen7: use SURFACE_STATE fields to select render level/layer
Chia-I Wu
olvaffe at gmail.com
Wed May 22 20:16:04 PDT 2013
On Thu, May 23, 2013 at 11:00 AM, 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.
>From my understanding of the PRM, "Minimum Array Element" for RT cube
surfaces must be zero. Maybe this was the reason?
> Anyway, I'll investigate cleaning this up for gen7, since that is what
> we are starting with.
>
> Thanks,
>
> -Jordan
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
--
olv at LunarG.com
More information about the mesa-dev
mailing list