[Mesa-dev] [PATCH 5/8] i965/miptree: Drop MIPTREE_LAYOUT_ACCELERATED_UPLOAD in mcs init
Jason Ekstrand
jason at jlekstrand.net
Tue Jun 13 23:30:16 UTC 2017
I think I agree with the content of this patch but it needs a new commit
message. :-)
On Tue, Jun 13, 2017 at 7:53 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:
> because buffers get unconditionally initialised by cpu writing.
>
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index f51bbd9cda..5b26300a0f 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -1662,7 +1662,12 @@ intel_miptree_alloc_mcs(struct brw_context *brw,
> assert(temp_mcs_surf.size &&
> (temp_mcs_surf.size % temp_mcs_surf.row_pitch == 0));
>
> - const uint32_t alloc_flags = BO_ALLOC_FOR_RENDER;
> + /* Buffer needs to be initialised requiring the buffer to be
> immediately
> + * mapped to cpu space for writing. Therefore do not use the gpu access
> + * flag which can cause an unnecessary delay if the backing pages
> happened
> + * to be just used by the GPU.
> + */
> + const uint32_t alloc_flags = 0;
> mt->mcs_buf = intel_alloc_aux_buffer(brw, "mcs-miptree",
> &temp_main_surf, &temp_mcs_surf,
> alloc_flags, mt);
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170613/34b75e34/attachment.html>
More information about the mesa-dev
mailing list