[Mesa-dev] [PATCH] gallium: handle unhandled PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT

Brian Paul brianp at vmware.com
Thu Jan 31 07:14:53 PST 2013


On 01/31/2013 01:35 AM, Andreas Boll wrote:
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60098
> ---
>   src/gallium/drivers/llvmpipe/lp_screen.c     |    1 +
>   src/gallium/drivers/nv30/nv30_screen.c       |    1 +
>   src/gallium/drivers/r300/r300_screen.c       |    1 +
>   src/gallium/drivers/r600/r600_pipe.c         |    1 +
>   src/gallium/drivers/radeonsi/radeonsi_pipe.c |    1 +
>   src/gallium/drivers/softpipe/sp_screen.c     |    2 ++
>   src/gallium/drivers/svga/svga_screen.c       |    1 +
>   7 files changed, 8 insertions(+)
>
> diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
> index 3769428..f3bc516 100644
> --- a/src/gallium/drivers/llvmpipe/lp_screen.c
> +++ b/src/gallium/drivers/llvmpipe/lp_screen.c
> @@ -217,6 +217,7 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>      case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
>      case PIPE_CAP_CUBE_MAP_ARRAY:
>      case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> +   case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>         return 0;
>      }
>      /* should only get here on unhandled cases */
> diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c
> index f3faf8a..d30ae11 100644
> --- a/src/gallium/drivers/nv30/nv30_screen.c
> +++ b/src/gallium/drivers/nv30/nv30_screen.c
> @@ -120,6 +120,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>      case PIPE_CAP_TEXTURE_MULTISAMPLE:
>      case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
>      case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> +   case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>         return 0;
>      case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY:
>      case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY:
> diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
> index d0f0070..5a249ae 100644
> --- a/src/gallium/drivers/r300/r300_screen.c
> +++ b/src/gallium/drivers/r300/r300_screen.c
> @@ -155,6 +155,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>           case PIPE_CAP_TEXTURE_MULTISAMPLE:
>           case PIPE_CAP_CUBE_MAP_ARRAY:
>           case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> +        case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>               return 0;
>
>           /* SWTCL-only features. */
> diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
> index a59578d..c0dab9d 100644
> --- a/src/gallium/drivers/r600/r600_pipe.c
> +++ b/src/gallium/drivers/r600/r600_pipe.c
> @@ -564,6 +564,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>   	case PIPE_CAP_FRAGMENT_COLOR_CLAMPED:
>   	case PIPE_CAP_VERTEX_COLOR_CLAMPED:
>   	case PIPE_CAP_USER_VERTEX_BUFFERS:
> +	case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>   		return 0;
>
>   	/* Stream output. */
> diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> index 471dd48..98f72eb 100644
> --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
> @@ -355,6 +355,7 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
>   	case PIPE_CAP_QUERY_TIMESTAMP:
>   	case PIPE_CAP_CUBE_MAP_ARRAY:
>   	case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> +	case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>   		return 0;
>
>   	/* Stream output. */
> diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
> index af40261..16aba5a 100644
> --- a/src/gallium/drivers/softpipe/sp_screen.c
> +++ b/src/gallium/drivers/softpipe/sp_screen.c
> @@ -171,6 +171,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
>         return 1;
>      case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
>         return 1;
> +   case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
> +      return 0;
>      }
>      /* should only get here on unhandled cases */
>      debug_printf("Unexpected PIPE_CAP %d query\n", param);
> diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
> index c6f0343..c2492f9 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -256,6 +256,7 @@ svga_get_param(struct pipe_screen *screen, enum pipe_cap param)
>      case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
>      case PIPE_CAP_CUBE_MAP_ARRAY:
>      case PIPE_CAP_TEXTURE_BUFFER_OBJECTS:
> +   case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
>         return 0;
>      case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
>         return 1;

Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list