[Mesa-dev] [PATCH] st/mesa: set Const.MaxTextureMbytes

Ilia Mirkin imirkin at alum.mit.edu
Mon Aug 22 15:10:15 UTC 2016


Hmmm... well, this looks fine, but a couple drivers will run into trouble:

src/gallium/drivers/virgl/virgl_screen.c:   case PIPE_CAP_VIDEO_MEMORY:
src/gallium/drivers/virgl/virgl_screen.c-      return 0;
src/gallium/drivers/freedreno/freedreno_screen.c:       case
PIPE_CAP_VIDEO_MEMORY:
src/gallium/drivers/freedreno/freedreno_screen.c-
DBG("FINISHME: The value returned is incorrect\n");
src/gallium/drivers/freedreno/freedreno_screen.c-               return 10;
src/gallium/drivers/svga/svga_screen.c:   case PIPE_CAP_VIDEO_MEMORY:
src/gallium/drivers/svga/svga_screen.c-      /* XXX: Query the host ? */
src/gallium/drivers/svga/svga_screen.c-      return 1;

IMHO those should be addressed before the general functionality goes
in. (Also this will end up returning 0 on GK20A with nouveau as
well...) Otherwise this patch is

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

  -ilia

On Mon, Aug 22, 2016 at 10:06 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
>  src/mesa/state_tracker/st_extensions.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 1f53bdf..ebf1f04 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -458,20 +458,22 @@ void st_init_limits(struct pipe_screen *screen,
>      * PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS has the same
>      * number of layers as we need, although we technically
>      * could have more the generality is not really useful
>      * in practicality.
>      */
>     c->MaxFramebufferLayers =
>        screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
>
>     c->MaxWindowRectangles =
>        screen->get_param(screen, PIPE_CAP_MAX_WINDOW_RECTANGLES);
> +
> +   c->MaxTextureMbytes = screen->get_param(screen, PIPE_CAP_VIDEO_MEMORY);
>  }
>
>
>  /**
>   * Given a member \c x of struct gl_extensions, return offset of
>   * \c x in bytes.
>   */
>  #define o(x) offsetof(struct gl_extensions, x)
>
>
> --
> 2.7.4
>
> _______________________________________________
> 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