[Mesa-dev] [PATCH 3/4] intel: Add a flag for miptree mapping to disable transcoding.

Matt Turner mattst88 at gmail.com
Wed Feb 27 01:11:17 PST 2013


On Tue, Feb 26, 2013 at 11:15 PM, Eric Anholt <eric at anholt.net> wrote:
> I want to reuse intel_miptree_map() to replace some region mapping that's
> broken for separate stencil, but doing so would result in new demands on
> ETC transcode that we actually don't want to happen.
> ---
>  src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    8 ++++----
>  src/mesa/drivers/dri/intel/intel_mipmap_tree.h |   11 +++++++++++
>  2 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> index 306cbbe..217f13d 100644
> --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
> @@ -1575,9 +1575,9 @@ intel_miptree_map_singlesample(struct intel_context *intel,
>
>     if (mt->format == MESA_FORMAT_S8) {
>        intel_miptree_map_s8(intel, mt, map, level, slice);
> -   } else if (mt->wraps_etc) {
> +   } else if (mt->wraps_etc && !(mode & BRW_MAP_DIRECT_BIT)) {
>        intel_miptree_map_etc(intel, mt, map, level, slice);
> -   } else if (mt->stencil_mt) {
> +   } else if (mt->stencil_mt && !(mode & BRW_MAP_DIRECT_BIT)) {
>        intel_miptree_map_depthstencil(intel, mt, map, level, slice);
>     }
>     /* According to the Ivy Bridge PRM, Vol1 Part4, section 1.2.1.2 (Graphics
> @@ -1633,9 +1633,9 @@ intel_miptree_unmap_singlesample(struct intel_context *intel,
>
>     if (mt->format == MESA_FORMAT_S8) {
>        intel_miptree_unmap_s8(intel, mt, map, level, slice);
> -   } else if (mt->wraps_etc) {
> +   } else if (mt->wraps_etc && !(map->mode & BRW_MAP_DIRECT_BIT)) {
>        intel_miptree_unmap_etc(intel, mt, map, level, slice);
> -   } else if (mt->stencil_mt) {
> +   } else if (mt->stencil_mt && !(map->mode & BRW_MAP_DIRECT_BIT)) {
>        intel_miptree_unmap_depthstencil(intel, mt, map, level, slice);
>     } else if (map->bo) {
>        intel_miptree_unmap_blit(intel, mt, map, level, slice);
> diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> index 27540bc..acd5e9e 100644
> --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
> @@ -66,6 +66,17 @@ extern "C" {
>  struct intel_resolve_map;
>  struct intel_texture_image;
>
> +/**
> + * When calling intel_miptree_map() on an ETC-transcoded-to-RGB miptree or a
> + * depthstencil-split-to-separate-stencil miptree, we'll normally make a
> + * tmeporary and recreate the kind of data requested by Mesa core, since we're
        ^
Typo.


More information about the mesa-dev mailing list