[Mesa-dev] [PATCH v2 22/24] nvc0: inform users that 3D images are not fully supported

Ilia Mirkin imirkin at alum.mit.edu
Tue Apr 26 01:28:06 UTC 2016


On Mon, Apr 25, 2016 at 4:15 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> 3D images are a bit more complicated to implement and will probably
> requires a bunch of headaches and we don't care for now because they
> do not seem to be really used by apps.
>
> v2: add a pipe_debug_message
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu> (v1)
> ---
>  src/gallium/drivers/nouveau/nvc0/nvc0_context.h |  2 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_tex.c     | 11 ++++++++---
>  src/gallium/drivers/nouveau/nvc0/nve4_compute.c |  2 +-
>  3 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h
> index 107b737..c67a07f 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h
> @@ -328,7 +328,7 @@ void nvc0_validate_samplers(struct nvc0_context *);
>  void nve4_set_tex_handles(struct nvc0_context *);
>  void nvc0_validate_surfaces(struct nvc0_context *);
>  void nve4_set_surface_info(struct nouveau_pushbuf *, struct pipe_image_view *,
> -                           struct nvc0_screen *);
> +                           struct nvc0_context *);
>
>  struct pipe_sampler_view *
>  nvc0_create_texture_view(struct pipe_context *,
> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
> index f5bf2ca..6d9f157 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
> @@ -782,8 +782,9 @@ nvc0_get_surface_dims(struct pipe_image_view *view, int *width, int *height,
>  void
>  nve4_set_surface_info(struct nouveau_pushbuf *push,
>                        struct pipe_image_view *view,
> -                      struct nvc0_screen *screen)
> +                      struct nvc0_context *nvc0)
>  {
> +   struct nvc0_screen *screen = nvc0->screen;
>     struct nv04_resource *res;
>     uint64_t address;
>     uint32_t *const info = push->cur;
> @@ -884,7 +885,11 @@ nve4_set_surface_info(struct nouveau_pushbuf *push,
>           if (mt->layout_3d) {
>              address += nvc0_mt_zslice_offset(mt, view->u.tex.level, z);
>              /* doesn't work if z passes z-tile boundary */
> -            assert(depth == 1);
> +            if (depth > 1) {
> +               pipe_debug_message(&nvc0->base.debug, SHADER_INFO,

mmmmm... not really SHADER_INFO. How about CONFORMANCE?

> +                                  "3D images are not really supported!");
> +               debug_printf("3D images are not really supported!");

debug_printf needs a \n at the end. With those fixed,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> +            }
>           } else {
>              address += mt->layer_stride * z;
>           }
> @@ -938,7 +943,7 @@ nve4_update_surface_bindings(struct nvc0_context *nvc0)
>           if (view->resource) {
>              struct nv04_resource *res = nv04_resource(view->resource);
>
> -            nve4_set_surface_info(push, view, screen);
> +            nve4_set_surface_info(push, view, nvc0);
>              BCTX_REFN(nvc0->bufctx_3d, 3D_SUF, res, RDWR);
>           } else {
>              for (j = 0; j < 16; j++)
> diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> index 05a49b1..0fe479a 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> @@ -219,7 +219,7 @@ nve4_compute_validate_surfaces(struct nvc0_context *nvc0)
>        if (view->resource) {
>           struct nv04_resource *res = nv04_resource(view->resource);
>
> -         nve4_set_surface_info(push, view, screen);
> +         nve4_set_surface_info(push, view, nvc0);
>           BCTX_REFN(nvc0->bufctx_cp, CP_SUF, res, RDWR);
>        } else {
>           for (j = 0; j < 16; j++)
> --
> 2.8.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list