[Mesa-stable] [Mesa-dev] [PATCH] i965/tex: Don't pass samples to miptree_create_for_teximage
Pohjolainen, Topi
topi.pohjolainen at gmail.com
Sat Aug 19 19:45:37 UTC 2017
On Sat, Aug 19, 2017 at 11:07:35AM -0700, Jason Ekstrand wrote:
> In 76e2f390f9863a35, when Topi switched num_samples from 0 to 1 for
> single-sampled, he accidentally switched the last parameter in the call
> to miptree_create_for_teximage from 0 to 1 thinking it was num_samples
> when it was actually layout_flags. Switching from 0 to 1 added the
> MIPTREE_LAYOUT_ACCELERATED_UPLOAD flag which causes us to allocate a
> busy BO instead of an idle one. This caused the subsequent CPU upload
> to consistently stall. The end result was a 15% performance drop in the
> SynMark v7 DrvRes microbenchmark. This restores the old behavior and
> fixes the performance regression.
Oh man :(, huge thanks for tracking this down:
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>
> Fixes: 76e2f390f9863a356d1419982dec705260d67eff
> Bugzilla: https://bugs.freedesktop.org/102260
> Cc: mesa-stable at lists.freedesktop.org
> ---
> src/mesa/drivers/dri/i965/intel_tex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_tex.c b/src/mesa/drivers/dri/i965/intel_tex.c
> index 890c82d..94a7ad3 100644
> --- a/src/mesa/drivers/dri/i965/intel_tex.c
> +++ b/src/mesa/drivers/dri/i965/intel_tex.c
> @@ -94,7 +94,7 @@ intel_alloc_texture_image_buffer(struct gl_context *ctx,
> } else {
> intel_image->mt = intel_miptree_create_for_teximage(brw, intel_texobj,
> intel_image,
> - 1 /* samples */);
> + MIPTREE_CREATE_DEFAULT);
> if (!intel_image->mt)
> return false;
>
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list