[Mesa-dev] [PATCH 1/2] nouveau: Add basic memory object support

Ilia Mirkin imirkin at alum.mit.edu
Fri Jun 22 02:09:14 UTC 2018


Hi Miguel,

Preface: I know little about this ext, so feel free to educate me on
the wrongness of my thinking.

On Thu, Jun 21, 2018 at 10:01 PM, Miguel A. Vico <mvicomoya at nvidia.com> wrote:
> Add memory object support for nvc0 and nv50
>
> Signed-off-by: Miguel A Vico Moya <mvicomoya at nvidia.com>
> ---
>  .../drivers/nouveau/nv50/nv50_miptree.c       | 49 +++++++++++++----
>  .../drivers/nouveau/nv50/nv50_resource.c      | 52 +++++++++++++++++++
>  .../drivers/nouveau/nv50/nv50_resource.h      | 33 ++++++++++++
>  .../drivers/nouveau/nvc0/nvc0_resource.c      | 22 ++++++++
>  4 files changed, 146 insertions(+), 10 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
> index f2e304fde6..91007d3dac 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
> @@ -397,13 +397,13 @@ nv50_miptree_create(struct pipe_screen *pscreen,
>     return pt;
>  }
>
> -struct pipe_resource *
> -nv50_miptree_from_handle(struct pipe_screen *pscreen,
> -                         const struct pipe_resource *templ,
> -                         struct winsys_handle *whandle)
> +static struct pipe_resource *
> +nv50_miptree_from_bo(struct pipe_screen *pscreen,
> +                     const struct pipe_resource *templ,
> +                     struct nouveau_bo *bo,
> +                     uint32_t stride)
>  {
>     struct nv50_miptree *mt;
> -   unsigned stride;
>
>     /* only supports 2D, non-mipmapped textures for the moment */

Won't this be a drag, since you're supposed to be able to "place" 3d
textures, as well as mip-mapped ones?

The reason I haven't looked at doing VK for nouveau yet is that the
nouveau kernel API does not allow explicit userspace-side VA
management, which would be required to allow something like this. I
believe it would also be required to implement this GL extension. Feel
free to correct my thinking.

Cheers,

  -ilia


More information about the mesa-dev mailing list