[Mesa-dev] [PATCH v2 2/5] i965: Removed assertions from intel_miptree_map_etc

Nanley Chery nanleychery at gmail.com
Wed Feb 6 19:33:47 UTC 2019


On Sun, Feb 03, 2019 at 03:07:33PM +0200, Eleni Maria Stea wrote:
> The assertions that the GL_MAP_WRITE_BIT and GL_MAP_INVALIDATE_RANGE_BIT
> in intel_miptree_map_etc will fail when the ETC miptree is mapped for
> reading. As we are about to fix the GetCompressed* functions in the
> following patches and allow the reading from etc miptrees, we have to
> remove them.
> 
> Fixes the crash of the test
> KHR-GL45.direct_state_access.textures_compressed_subimage on Gen 7 GPUs.
> ---
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 479188fd1c8..0a25dfd0161 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -3497,9 +3497,6 @@ intel_miptree_map_etc(struct brw_context *brw,
>        assert(mt->format == MESA_FORMAT_R8G8B8X8_UNORM);
>     }
>  
> -   assert(map->mode & GL_MAP_WRITE_BIT);
> -   assert(map->mode & GL_MAP_INVALIDATE_RANGE_BIT);
> -

Isn't this function unreachable with the next patch?

>     intel_miptree_access_raw(brw, mt, level, slice, true);
>  
>     map->stride = _mesa_format_row_stride(mt->etc_format, map->w);
> -- 
> 2.20.1
> 


More information about the mesa-dev mailing list