Bug 44101

Summary: [PATCH] egl_g3d_api.c:176:10: error: too few arguments to function ‘gctx->stapi->create_context’
Product: Mesa Reporter: Alexandre Demers <alexandre.f.demers>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: djc, vlee
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fixes stapi->createContext usage

Description Alexandre Demers 2011-12-23 11:40:42 UTC
When building mesa from git, it ends with an error:

gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/egl/main -I../../../../src/egl/wayland/wayland-drm/ -I../../../../include -DHAVE_X11_BACKEND -DHAVE_DRM_BACKEND -D_GNU_SOURCE -DPTHREADS -DDEBUG -DTEXTURE_FLOAT_ENABLED -DHAVE_POSIX_MEMALIGN -DMESA_SELINUX -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2 -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -DHAVE_XEXTPROTO_71 -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0300 -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fno-builtin-memcmp -m64 -g  -fPIC  -DUSE_X86_64_ASM -D_GNU_SOURCE -DPTHREADS -DDEBUG -DTEXTURE_FLOAT_ENABLED -DHAVE_POSIX_MEMALIGN -DMESA_SELINUX -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XCB_DRI2 -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN -DHAVE_XEXTPROTO_71 -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0300 -fvisibility=hidden common/egl_g3d_api.c -o common/egl_g3d_api.o
common/egl_g3d_api.c: In function ‘egl_g3d_create_context’:
common/egl_g3d_api.c:176:10: warning: passing argument 4 of ‘gctx->stapi->create_context’ from incompatible pointer type [enabled by default]
common/egl_g3d_api.c:176:10: note: expected ‘enum st_context_error *’ but argument is of type ‘struct st_context_iface *’
common/egl_g3d_api.c:176:10: error: too few arguments to function ‘gctx->stapi->create_context’
make[4]: *** [common/egl_g3d_api.o] Error 1

It seems commit d18152028e1825c05c7de33acacee3336350a096 changes the number of arguments, but this change is not mirrored everywhere. Before this commit, compilation works fine.
Comment 1 Ian Romanick 2011-12-23 16:09:51 UTC
*** Bug 44105 has been marked as a duplicate of this bug. ***
Comment 2 Alexandre Demers 2011-12-23 20:55:25 UTC
Created attachment 54776 [details] [review]
Fixes stapi->createContext usage

Fixed the bug, fixed a warning where attributs and error arguments had been inverted and fixed another call that was missing an argument.
Comment 3 Jose Fonseca 2011-12-24 03:53:23 UTC
(In reply to comment #2)
> Created attachment 54776 [details] [review] [review]
> Fixes stapi->createContext usage
> 
> Fixed the bug, fixed a warning where attributs and error arguments had been
> inverted and fixed another call that was missing an argument.

Applied. Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.