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

Eric Anholt eric at anholt.net
Wed May 22 15:56:09 PDT 2013


Jordan Justen <jordan.l.justen at intel.com> writes:

> Rather than pointing the surface_state directly at a single
> sub-image of the texture for rendering, we now point the
> surface_state at the top level of the texture, and configure
> the surface_state as needed based on this.

Thanks, this looks way better.

> @@ -550,7 +554,28 @@ gen7_update_renderbuffer_surface(struct brw_context *brw,
>                      __FUNCTION__, _mesa_get_format_name(rb_format));
>     }
>  
> -   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.
-------------- 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/20130522/a902c463/attachment.pgp>


More information about the mesa-dev mailing list