[Mesa-dev] [PATCH] nv50, nvc0: allow to create resources other than buffers

Ilia Mirkin imirkin at alum.mit.edu
Wed Nov 25 09:26:01 PST 2015


Yeah, but these are "restricted" surfaces. You can't use them as,
e.g., render targets. And the whole surface concept is going to go
away, with pipe_buffer_view and pipe_image_view.

If you really like, move these asserts to where surfaces are used with
the assumption that a miptree is backing them.

On Wed, Nov 25, 2015 at 12:19 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> For the compute support, we might create 1D/2D/3D textures. This fixes
> an assertion when executing src/gallium/tests/trivial/compute.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nv50/nv50_resource.c | 2 --
>  src/gallium/drivers/nouveau/nvc0/nvc0_resource.c | 2 --
>  2 files changed, 4 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_resource.c b/src/gallium/drivers/nouveau/nv50/nv50_resource.c
> index 325c19f..5d415ae7 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_resource.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_resource.c
> @@ -68,8 +68,6 @@ nv50_surface_create(struct pipe_context *pipe,
>                      struct pipe_resource *pres,
>                      const struct pipe_surface *templ)
>  {
> -   /* surfaces are assumed to be miptrees all over the place. */
> -   assert(pres->target != PIPE_BUFFER);
>     if (unlikely(pres->target == PIPE_BUFFER))
>        return nv50_surface_from_buffer(pipe, pres, templ);
>     return nv50_miptree_surface_new(pipe, pres, templ);
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> index 15c803c..7fbc6e1 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_resource.c
> @@ -37,8 +37,6 @@ nvc0_surface_create(struct pipe_context *pipe,
>                      struct pipe_resource *pres,
>                      const struct pipe_surface *templ)
>  {
> -   /* surfaces are assumed to be miptrees all over the place. */
> -   assert(pres->target != PIPE_BUFFER);
>     if (unlikely(pres->target == PIPE_BUFFER))
>        return nv50_surface_from_buffer(pipe, pres, templ);
>     return nvc0_miptree_surface_new(pipe, pres, templ);
> --
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list