This patch is

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

On 03/24/2016 11:09 AM, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <a...@redhat.com>
> ---
>  src/mapi/glapi/gen/Makefile.am       | 11 -----------
>  src/mapi/glapi/gen/glX_proto_recv.py | 33 ++++++++++-----------------------
>  2 files changed, 10 insertions(+), 34 deletions(-)
> 
> diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
> index 0d5e408..1e34632 100644
> --- a/src/mapi/glapi/gen/Makefile.am
> +++ b/src/mapi/glapi/gen/Makefile.am
> @@ -89,18 +89,7 @@ EXTRA_DIST= \
>  XORG_GLX_DIR = $(XORG_BASE)/glx
>  XORG_GLAPI_DIR = $(XORG_BASE)/glx
>  
> -XORG_GLAPI_OUTPUTS = \
> -     $(XORG_GLAPI_DIR)/glprocs.h \
> -     $(XORG_GLAPI_DIR)/glapitable.h \
> -     $(XORG_GLAPI_DIR)/dispatch.h
> -
> -if HAVE_APPLEDRI
> -XORG_GLAPI_OUTPUTS += \
> -     $(XORG_GLAPI_DIR)/glapi_gentable.c
> -endif
> -
>  XORG_OUTPUTS = \
> -     $(XORG_GLAPI_OUTPUTS) \
>       $(XORG_GLX_DIR)/indirect_dispatch.c \
>       $(XORG_GLX_DIR)/indirect_dispatch_swap.c \
>       $(XORG_GLX_DIR)/indirect_dispatch.h \
> diff --git a/src/mapi/glapi/gen/glX_proto_recv.py 
> b/src/mapi/glapi/gen/glX_proto_recv.py
> index 5d95f27..916da94 100644
> --- a/src/mapi/glapi/gen/glX_proto_recv.py
> +++ b/src/mapi/glapi/gen/glX_proto_recv.py
> @@ -80,21 +80,14 @@ class 
> PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
>  
>  
>      def printRealHeader(self):
> -        print '#include <X11/Xmd.h>'
> -        print '#include <GL/gl.h>'
> -        print '#include <GL/glxproto.h>'
> -
>          print '#include <inttypes.h>'
> +        print '#include "glxserver.h"'
>          print '#include "indirect_size.h"'
>          print '#include "indirect_size_get.h"'
>          print '#include "indirect_dispatch.h"'
> -        print '#include "glxserver.h"'
>          print '#include "glxbyteorder.h"'
>          print '#include "indirect_util.h"'
>          print '#include "singlesize.h"'
> -        print '#include "glapi.h"'
> -        print '#include "glapitable.h"'
> -        print '#include "dispatch.h"'
>          print ''
>          print '#define __GLX_PAD(x)  (((x) + 3) & ~3)'
>          print ''
> @@ -238,13 +231,7 @@ class 
> PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
>              list.append( '%s        %s' % (indent, location) )
>  
>  
> -        if len( list ):
> -            print '%s    %sCALL_%s( GET_DISPATCH(), (' % (indent, 
> retval_assign, f.name)
> -            print string.join( list, ",\n" )
> -            print '%s    ) );' % (indent)
> -        else:
> -            print '%s    %sCALL_%s( GET_DISPATCH(), () );' % (indent, 
> retval_assign, f.name)
> -        return
> +        print '%s    %sgl%s(%s);' % (indent, retval_assign, f.name, 
> string.join(list, ',\n'))
>  
>  
>      def common_func_print_just_start(self, f, indent):
> @@ -507,18 +494,18 @@ class 
> PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
>              # the must NEVER be byte-swapped.
>  
>              if not (img.img_type == "GL_BITMAP" and img.img_format == 
> "GL_COLOR_INDEX"):
> -                print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_SWAP_BYTES,   hdr->swapBytes) );'
> +                print '    glPixelStorei(GL_UNPACK_SWAP_BYTES, 
> hdr->swapBytes);'
>  
> -            print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_LSB_FIRST,    hdr->lsbFirst) );'
> +            print '    glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst);'
>  
> -            print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_ROW_LENGTH,   (GLint) %shdr->rowLength%s) );' % (pre, post)
> +            print '    glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) 
> %shdr->rowLength%s);' % (pre, post)
>              if img.depth:
> -                print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_IMAGE_HEIGHT, (GLint) %shdr->imageHeight%s) );' % (pre, post)
> -            print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_SKIP_ROWS,    (GLint) %shdr->skipRows%s) );' % (pre, post)
> +                print '    glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) 
> %shdr->imageHeight%s);' % (pre, post)
> +            print '    glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) 
> %shdr->skipRows%s);' % (pre, post)
>              if img.depth:
> -                print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_SKIP_IMAGES,  (GLint) %shdr->skipImages%s) );' % (pre, post)
> -            print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_SKIP_PIXELS,  (GLint) %shdr->skipPixels%s) );' % (pre, post)
> -            print '    CALL_PixelStorei( GET_DISPATCH(), 
> (GL_UNPACK_ALIGNMENT,    (GLint) %shdr->alignment%s) );' % (pre, post)
> +                print '    glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) 
> %shdr->skipImages%s);' % (pre, post)
> +            print '    glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) 
> %shdr->skipPixels%s);' % (pre, post)
> +            print '    glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) 
> %shdr->alignment%s);' % (pre, post)
>              print ''
>  
>  
> 

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to