[Mesa-dev] [PATCH 14/16] st/nine: Add debug warning when application uses sw processing

Ilia Mirkin imirkin at alum.mit.edu
Fri Apr 24 14:50:36 PDT 2015


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

On Fri, Apr 24, 2015 at 4:09 PM, Axel Davy <axel.davy at ens.fr> wrote:
> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
>  src/gallium/state_trackers/nine/cubetexture9.c   |  3 +++
>  src/gallium/state_trackers/nine/device9.c        |  5 +++++
>  src/gallium/state_trackers/nine/indexbuffer9.c   | 14 ++++++++------
>  src/gallium/state_trackers/nine/texture9.c       |  5 +++++
>  src/gallium/state_trackers/nine/vertexbuffer9.c  |  4 +++-
>  src/gallium/state_trackers/nine/volumetexture9.c |  3 +++
>  6 files changed, 27 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c
> index e250315..d81cc70 100644
> --- a/src/gallium/state_trackers/nine/cubetexture9.c
> +++ b/src/gallium/state_trackers/nine/cubetexture9.c
> @@ -93,6 +93,9 @@ NineCubeTexture9_ctor( struct NineCubeTexture9 *This,
>              PIPE_BIND_TRANSFER_READ |
>              PIPE_BIND_TRANSFER_WRITE;
>      }
> +    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
> +        DBG("Application asked for Software Vertex Processing, "
> +            "but this is unimplemented\n");
>
>      This->surfaces = CALLOC(6 * (info->last_level + 1), sizeof(*This->surfaces));
>      if (!This->surfaces)
> diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
> index 4ef02bb..924f755 100644
> --- a/src/gallium/state_trackers/nine/device9.c
> +++ b/src/gallium/state_trackers/nine/device9.c
> @@ -183,6 +183,11 @@ NineDevice9_ctor( struct NineDevice9 *This,
>      if (!(This->params.BehaviorFlags & D3DCREATE_FPU_PRESERVE))
>          nine_setup_fpu();
>
> +    if (This->params.BehaviorFlags & D3DCREATE_SOFTWARE_VERTEXPROCESSING)
> +        DBG("Application asked full Software Vertex Processing. Ignoring.\n");
> +    if (This->params.BehaviorFlags & D3DCREATE_MIXED_VERTEXPROCESSING)
> +        DBG("Application asked mixed Software Vertex Processing. Ignoring.\n");
> +
>      This->pipe = This->screen->context_create(This->screen, NULL);
>      if (!This->pipe) { return E_OUTOFMEMORY; } /* guess */
>
> diff --git a/src/gallium/state_trackers/nine/indexbuffer9.c b/src/gallium/state_trackers/nine/indexbuffer9.c
> index 48553fd..860313b 100644
> --- a/src/gallium/state_trackers/nine/indexbuffer9.c
> +++ b/src/gallium/state_trackers/nine/indexbuffer9.c
> @@ -63,12 +63,14 @@ NineIndexBuffer9_ctor( struct NineIndexBuffer9 *This,
>      if (pDesc->Pool == D3DPOOL_SYSTEMMEM)
>          info->usage = PIPE_USAGE_STAGING;
>
> -    /* if (This->desc.Usage & D3DUSAGE_DONOTCLIP) { } */
> -    /* if (This->desc.Usage & D3DUSAGE_NONSECURE) { } */
> -    /* if (This->desc.Usage & D3DUSAGE_NPATCHES) { } */
> -    /* if (This->desc.Usage & D3DUSAGE_POINTS) { } */
> -    /* if (This->desc.Usage & D3DUSAGE_RTPATCHES) { } */
> -    /* if (This->desc.Usage & D3DUSAGE_SOFTWAREPROCESSING) { } */
> +    /* if (pDesc->Usage & D3DUSAGE_DONOTCLIP) { } */
> +    /* if (pDesc->Usage & D3DUSAGE_NONSECURE) { } */
> +    /* if (pDesc->Usage & D3DUSAGE_NPATCHES) { } */
> +    /* if (pDesc->Usage & D3DUSAGE_POINTS) { } */
> +    /* if (pDesc->Usage & D3DUSAGE_RTPATCHES) { } */
> +    if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING)
> +        DBG("Application asked for Software Vertex Processing, "
> +            "but this is unimplemented\n");
>
>      info->height0 = 1;
>      info->depth0 = 1;
> diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
> index 0dbdd37..78a632f 100644
> --- a/src/gallium/state_trackers/nine/texture9.c
> +++ b/src/gallium/state_trackers/nine/texture9.c
> @@ -125,6 +125,11 @@ NineTexture9_ctor( struct NineTexture9 *This,
>              PIPE_BIND_TRANSFER_READ |
>              PIPE_BIND_TRANSFER_WRITE;
>      }
> +
> +    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
> +        DBG("Application asked for Software Vertex Processing, "
> +            "but this is unimplemented\n");
> +
>      if (pSharedHandle)
>          info->bind |= PIPE_BIND_SHARED;
>
> diff --git a/src/gallium/state_trackers/nine/vertexbuffer9.c b/src/gallium/state_trackers/nine/vertexbuffer9.c
> index 11cc60f..8e2eaaf 100644
> --- a/src/gallium/state_trackers/nine/vertexbuffer9.c
> +++ b/src/gallium/state_trackers/nine/vertexbuffer9.c
> @@ -76,7 +76,9 @@ NineVertexBuffer9_ctor( struct NineVertexBuffer9 *This,
>      /* if (pDesc->Usage & D3DUSAGE_NPATCHES) { } */
>      /* if (pDesc->Usage & D3DUSAGE_POINTS) { } */
>      /* if (pDesc->Usage & D3DUSAGE_RTPATCHES) { } */
> -    /* if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING) { } */
> +    if (pDesc->Usage & D3DUSAGE_SOFTWAREPROCESSING)
> +        DBG("Application asked for Software Vertex Processing, "
> +            "but this is unimplemented\n");
>      /* if (pDesc->Usage & D3DUSAGE_TEXTAPI) { } */
>
>      info->height0 = 1;
> diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c
> index 6c0073f..08fdd3d 100644
> --- a/src/gallium/state_trackers/nine/volumetexture9.c
> +++ b/src/gallium/state_trackers/nine/volumetexture9.c
> @@ -90,6 +90,9 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This,
>              PIPE_BIND_TRANSFER_READ |
>              PIPE_BIND_TRANSFER_WRITE;
>      }
> +    if (Usage & D3DUSAGE_SOFTWAREPROCESSING)
> +        DBG("Application asked for Software Vertex Processing, "
> +            "but this is unimplemented\n");
>
>      This->volumes = CALLOC(info->last_level + 1, sizeof(*This->volumes));
>      if (!This->volumes)
> --
> 2.1.0
>
> _______________________________________________
> 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