[Mesa-dev] [PATCH] gallivm: disable accurate cube corner for integer textures.

Roland Scheidegger sroland at vmware.com
Thu Aug 29 21:37:48 UTC 2019


Am 29.08.19 um 22:06 schrieb Dave Airlie:
> From: Dave Airlie <airlied at redhat.com>
> 
> Bugzilla: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.freedesktop.org%2Fshow_bug.cgi%3Fid%3D111511&data=02%7C01%7Csroland%40vmware.com%7Cfec452f1a7bc48fdf26c08d72cbc7631%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637027060290077242&sdata=DIFdJJllTfLtwIYd5GJVUNmCx9ecNrNKRrbSg9qkMy8%3D&reserved=0
> ---
>  src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
> index adb6adf143a..69dba78ac8a 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
> @@ -1039,6 +1039,10 @@ lp_build_sample_image_linear(struct lp_build_sample_context *bld,
>  
>     accurate_cube_corners = ACCURATE_CUBE_CORNERS && seamless_cube_filter;
>  
> +   /* disable accurate cube corners for integer textures. */
> +   if (is_gather && util_format_is_pure_integer(bld->static_texture_state->format))
> +      accurate_cube_corners = FALSE;

I think should drop the is_gather condition - it would crash all the
same if it ends up here (which it shouldn't as the texture would be
incomplete in this case).

So just accurate_cube_corners = ACCURATE_CUBE_CORNERS &&
seamless_cube_filter && !util_format_is_pure_integer()
(maybe with a comment that we should only end up with the linear image
path here in case of gather).
With that fixed,
Reviewed-by: Roland Scheidegger <sroland at vmware.com>


>     lp_build_extract_image_sizes(bld,
>                                  &bld->int_size_bld,
>                                  bld->int_coord_type,
> 



More information about the mesa-dev mailing list