[Mesa-dev] [PATCH] configure: nuke --with-max-{width,height}
Brian Paul
brianp at vmware.com
Wed Apr 1 08:07:14 PDT 2015
On 04/01/2015 08:51 AM, Emil Velikov wrote:
> Unused as of commit 630ab0d27ba(mesa: remove last of MAX_WIDTH,
> MAX_HEIGHT). Update all the remaining references to the defines.
>
> XXX: Does the updated comments in xlib-libGL make sense, or should one
> consider SWRAST_MAX_WIDTH ?
>
> Cc: Brian Paul <brianp at vmware.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> configure.ac | 15 ---------------
> include/GL/osmesa.h | 6 ++----
> src/gallium/state_trackers/glx/xlib/glx_api.c | 2 +-
> src/mesa/drivers/x11/fakeglx.c | 2 +-
> 4 files changed, 4 insertions(+), 21 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3e5b6f5..beb9c31 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1823,21 +1823,6 @@ if ! echo "$egl_platforms" | grep -q 'x11'; then
> GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
> fi
>
> -AC_ARG_WITH([max-width],
> - [AS_HELP_STRING([--with-max-width=N],
> - [Maximum framebuffer width (4096)])],
> - [DEFINES="${DEFINES} -DMAX_WIDTH=${withval}";
> - AS_IF([test "${withval}" -gt "4096"],
> - [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
> -)
> -AC_ARG_WITH([max-height],
> - [AS_HELP_STRING([--with-max-height=N],
> - [Maximum framebuffer height (4096)])],
> - [DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}";
> - AS_IF([test "${withval}" -gt "4096"],
> - [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])]
> -)
> -
> dnl
> dnl Gallium LLVM
> dnl
> diff --git a/include/GL/osmesa.h b/include/GL/osmesa.h
> index 16ee89a..ca0d167 100644
> --- a/include/GL/osmesa.h
> +++ b/include/GL/osmesa.h
> @@ -41,10 +41,8 @@
> * OSMesaGetIntegerv - return OSMesa state parameters
> *
> *
> - * The limits on the width and height of an image buffer are MAX_WIDTH and
> - * MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024.
> - * You can increase them as needed but beware that many temporary arrays in
> - * Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT.
> + * The limits on the width and height of an image buffer can be retrieved
> + * via OSMesaGetIntegerv(OSMESA_MAX_WIDTH/OSMESA_MAX_HEIGHT).
> */
>
>
> diff --git a/src/gallium/state_trackers/glx/xlib/glx_api.c b/src/gallium/state_trackers/glx/xlib/glx_api.c
> index f9572b7..62c7f0d 100644
> --- a/src/gallium/state_trackers/glx/xlib/glx_api.c
> +++ b/src/gallium/state_trackers/glx/xlib/glx_api.c
> @@ -1636,7 +1636,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
> case GLX_MAX_PBUFFER_WIDTH:
> if (!fbconfig)
> return GLX_BAD_ATTRIBUTE;
> - /* XXX or MAX_WIDTH? */
> + /* XXX or MAX_VIEWPORT_WIDTH? */
> *value = DisplayWidth(xmvis->display, xmvis->visinfo->screen);
> break;
> case GLX_MAX_PBUFFER_HEIGHT:
> diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
> index 4fd6d75..10b148e 100644
> --- a/src/mesa/drivers/x11/fakeglx.c
> +++ b/src/mesa/drivers/x11/fakeglx.c
> @@ -1720,7 +1720,7 @@ get_config( XMesaVisual xmvis, int attrib, int *value, GLboolean fbconfig )
> case GLX_MAX_PBUFFER_WIDTH:
> if (!fbconfig)
> return GLX_BAD_ATTRIBUTE;
> - /* XXX or MAX_WIDTH? */
> + /* XXX or MAX_VIEWPORT_WIDTH? */
> *value = DisplayWidth(xmvis->display, xmvis->visinfo->screen);
> break;
> case GLX_MAX_PBUFFER_HEIGHT:
>
It should probably be ctx->Const.MaxRenderbufferSize but we don't have
access to context data in those functions.
Maybe /* XXX should be same as ctx->Const.MaxRenderbufferSize */
In any case, the patch looks good.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list