Bug 40729

Summary: d3d1x build error: any interface changes lately?
Product: Mesa Reporter: Alexandre Demers <alexandre.f.demers>
Component: OtherAssignee: mesa-dev
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: fix the build error

Description Alexandre Demers 2011-09-08 16:18:58 UTC
g++ -c -I. -I../../../../../src/gallium/include -I../../../../../src/gallium/auxiliary -I../../../../../src/gallium/drivers -I../../../../../include -Iinclude -I../gd3dapi -I../d3dapi -I../w32api -I../d3d1xstutil/include -I../include -I../../../include -I../../../auxiliary -I../../../state_trackers/egl/common -g -O2 -Wall -fno-strict-aliasing -m64 -g  -fPIC  -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=0x0208 -fvisibility=hidden -DDXGI_DRIVER_SEARCH_DIR=\"/usr/lib/x86_64-linux-gnu/egl\" -I/usr/lib/llvm-2.8/include   -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DGALLIUM_DXGI_USE_X11 -DGALLIUM_DXGI_USE_DRM src/dxgi_native.cpp -o src/dxgi_native.o
In file included from src/dxgi_private.h:34:0,
                 from src/dxgi_native.cpp:27:
../d3d1xstutil/include/d3d1xstutil.h:250:0: warning: "__uuidof" redefined
../w32api/guiddef.h:50:0: note: this is the location of the previous definition
In file included from ../w32api/windef.h:252:0,
                 from ../w32api/windows.h:41,
                 from ../w32api/rpc.h:29,
                 from ../w32api/objbase.h:19,
                 from ../d3d1xstutil/include/d3d1xstutil.h:45,
                 from src/dxgi_private.h:34,
                 from src/dxgi_native.cpp:27:
../w32api/winnt.h:685:35: warning: attributes ignored on elaborated-type-specifier that is not a forward declaration
In file included from ../w32api/objbase.h:20:0,
                 from ../d3d1xstutil/include/d3d1xstutil.h:45,
                 from src/dxgi_private.h:34,
                 from src/dxgi_native.cpp:27:
../w32api/rpcndr.h:177:1: warning: ‘_MIDL_STUB_MESSAGE’ has a field ‘_MIDL_STUB_MESSAGE::SavedContextHandles’ whose type uses the anonymous namespace
../w32api/rpcndr.h:479:32: warning: ‘_SCONTEXT_QUEUE’ has a field ‘_SCONTEXT_QUEUE::ArrayOfObjects’ whose type uses the anonymous namespace
src/dxgi_native.cpp: In member function ‘virtual HRESULT GalliumDXGISwapChain::Present(UINT, UINT)’:
src/dxgi_native.cpp:1240:46: error: cannot convert ‘native_attachment’ to ‘const native_present_control*’ in argument passing
make[5]: *** [src/dxgi_native.o] Error 1
Comment 1 Chia-I Wu 2011-09-08 21:01:08 UTC
Created attachment 50992 [details] [review]
fix the build error

Yes.  Does this patch help?
Comment 2 Alexandre Demers 2011-09-08 21:41:56 UTC
Not quite yet:

g++ -c -I. -I../../../../../src/gallium/include -I../../../../../src/gallium/auxiliary -I../../../../../src/gallium/drivers -I../../../../../include -Iinclude -I../gd3dapi -I../d3dapi -I../w32api -I../d3d1xstutil/include -I../include -I../../../include -I../../../auxiliary -I../../../state_trackers/egl/common -g -O2 -Wall -fno-strict-aliasing -m64 -g  -fPIC  -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=0x0208 -fvisibility=hidden -DDXGI_DRIVER_SEARCH_DIR=\"/usr/lib/x86_64-linux-gnu/egl\" -I/usr/lib/llvm-2.8/include   -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DGALLIUM_DXGI_USE_X11 -DGALLIUM_DXGI_USE_DRM src/dxgi_native.cpp -o src/dxgi_native.o
In file included from src/dxgi_private.h:34:0,
                 from src/dxgi_native.cpp:27:
../d3d1xstutil/include/d3d1xstutil.h:250:0: warning: "__uuidof" redefined
../w32api/guiddef.h:50:0: note: this is the location of the previous definition
In file included from ../w32api/windef.h:252:0,
                 from ../w32api/windows.h:41,
                 from ../w32api/rpc.h:29,
                 from ../w32api/objbase.h:19,
                 from ../d3d1xstutil/include/d3d1xstutil.h:45,
                 from src/dxgi_private.h:34,
                 from src/dxgi_native.cpp:27:
../w32api/winnt.h:685:35: warning: attributes ignored on elaborated-type-specifier that is not a forward declaration
In file included from ../w32api/objbase.h:20:0,
                 from ../d3d1xstutil/include/d3d1xstutil.h:45,
                 from src/dxgi_private.h:34,
                 from src/dxgi_native.cpp:27:
../w32api/rpcndr.h:177:1: warning: ‘_MIDL_STUB_MESSAGE’ has a field ‘_MIDL_STUB_MESSAGE::SavedContextHandles’ whose type uses the anonymous namespace
../w32api/rpcndr.h:479:32: warning: ‘_SCONTEXT_QUEUE’ has a field ‘_SCONTEXT_QUEUE::ArrayOfObjects’ whose type uses the anonymous namespace
src/dxgi_native.cpp: In member function ‘virtual HRESULT GalliumDXGISwapChain::Present(UINT, UINT)’:
src/dxgi_native.cpp:1109:31: error: aggregate ‘GalliumDXGISwapChain::Present(UINT, UINT)::pipe_present_control ctrl’ has incomplete type and cannot be defined
make[5]: *** [src/dxgi_native.o] Error 1
Comment 3 Chia-I Wu 2011-09-08 21:56:10 UTC
(In reply to comment #2)
> src/dxgi_native.cpp: In member function ‘virtual HRESULT
> GalliumDXGISwapChain::Present(UINT, UINT)’:
> src/dxgi_native.cpp:1109:31: error: aggregate
> ‘GalliumDXGISwapChain::Present(UINT, UINT)::pipe_present_control ctrl’ has
> incomplete type and cannot be defined
Does s/pipe/native/ at src/dxgi_native.cpp:1109 help?
Comment 4 Alexandre Demers 2011-09-08 22:03:17 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > src/dxgi_native.cpp: In member function ‘virtual HRESULT
> > GalliumDXGISwapChain::Present(UINT, UINT)’:
> > src/dxgi_native.cpp:1109:31: error: aggregate
> > ‘GalliumDXGISwapChain::Present(UINT, UINT)::pipe_present_control ctrl’ has
> > incomplete type and cannot be defined
> Does s/pipe/native/ at src/dxgi_native.cpp:1109 help?

Sorry, what? I think there is something missing in the action I should perform. ;)
Comment 5 Alexandre Demers 2011-09-08 22:10:52 UTC
OK, I think I got it working. You must have meant to replace "pipe" by "native" at line 1109. Doing this fixed your patch and allowed me to build without error.
Comment 6 Alexandre Demers 2011-09-08 22:13:10 UTC
Review of attachment 50992 [details] [review]:

Need to replace "struct pipe_present_control ctrl;" by "struct native_present_control ctrl;" at line 1109. Once done, it fixes the build.

Alex
Comment 7 Chia-I Wu 2011-09-09 00:48:56 UTC
Thanks for testing.  Patch committed.
Comment 8 soulpa7ch 2012-02-24 00:24:45 UTC
This bug seems to have popped up again in the repository:

GIT update -->
   repository:               git://anongit.freedesktop.org/mesa/mesa
   at the commit:            a0a9e56cfed1ab81c1068cffbfd9299f77c7e187
   branch:                   master
   storage directory:        "/usr/portage/distfiles/egit-src/mesa"
   checkout type:            bare repository
Cloning into /var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999...
done.
Branch branch-master set up to track remote branch master from origin.
Switched to a new branch 'branch-master'

This is the error I'm getting:

In file included from src/d3d_sm4_enums.cpp:1:0:
include/d3d1xstutil.h:250:0: warning: "__uuidof" redefined
../w32api/guiddef.h:50:0: note: this is the location of the previous definition
In file included from src/guids.cpp:2:0:
include/d3d1xstutil.h:250:0: warning: "__uuidof" redefined
../w32api/guiddef.h:50:0: note: this is the location of the previous definition
In file included from ../w32api/windef.h:252:0,

and so on...

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.