<div dir="ltr">On 22 May 2013 20:00, Jordan Justen <span dir="ltr"><<a href="mailto:jljusten@gmail.com" target="_blank">jljusten@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, May 22, 2013 at 3:56 PM, Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>> wrote:<br>
> Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>> writes:<br>
>> - surf[0] = BRW_SURFACE_2D << BRW_SURFACE_TYPE_SHIFT |<br>
>> + switch (gl_target) {<br>
>> + case GL_TEXTURE_CUBE_MAP_ARRAY:<br>
>> + case GL_TEXTURE_CUBE_MAP:<br>
>> + surftype = BRW_SURFACE_2D;<br>
>> + is_array = true;<br>
>> + depth *= 6;<br>
>> + break;<br>
>> + default:<br>
>> + surftype = translate_tex_target(gl_target);<br>
>> + is_array = _mesa_tex_target_is_array(gl_target);<br>
>> + break;<br>
>> + }<br>
><br>
> Why the conversion of cubes to arrays? It looks from mentions in the<br>
> "render target write" message section's mention of RTAI that cubes are<br>
> supported.<br>
<br>
</div>Hmm. Good catch.<br>
<br>
I think I started implementing this in brw_wm_surface_state.c, so I<br>
was looking at what would be needed for the older gens. It looks like<br>
pre-gen6, that cube-arrays were not supported in the surface_state.<br>
I'm not sure right now why I extended that to include converting<br>
non-array cubes to 2d-arrays as well.<br>
<br>
Anyway, I'll investigate cleaning this up for gen7, since that is what<br>
we are starting with.<br></blockquote><div><br></div><div>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.<br>
</div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
<br>
-Jordan<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div><br></div></div>