From b4b2091655676ec3b898d3ae7298192aa7f9147f Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Tue, 21 Sep 2010 22:34:40 +0200 Subject: [PATCH] d3d1x: add template parameters to base class ctor calls for GCC 4.4 GCC 4.5 is fine without them, but GCC 4.4 requires them. Should fully fix the build on GCC 4.4 --- .../d3d1x/dxgi/src/dxgi_native.cpp | 6 ++--- .../state_trackers/d3d1x/gd3d11/d3d11.cpp | 22 ++++++++++--------- .../d3d1x/gd3d11/d3d11_context.h | 4 ++-- .../d3d1x/gd3d11/d3d11_objects.h | 6 ++--- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp index 69ddbc5a0c0..41c8f29847e 100644 --- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp @@ -77,7 +77,7 @@ struct GalliumDXGIFactory : public GalliumDXGIObject void* resolver_cookie; GalliumDXGIFactory(const struct native_platform* platform, void* display, PFNHWNDRESOLVER resolver, void* resolver_cookie) - : GalliumDXGIObject((IUnknown*)NULL), platform(platform), display(display), resolver(resolver ? resolver : identity_resolver), resolver_cookie(resolver_cookie) + : GalliumDXGIObject((IUnknown*)NULL), platform(platform), display(display), resolver(resolver ? resolver : identity_resolver), resolver_cookie(resolver_cookie) {} virtual HRESULT STDMETHODCALLTYPE EnumAdapters( @@ -316,7 +316,7 @@ struct GalliumDXGIOutput : public GalliumDXGIObject(adapter), connector(connector) { memset(&desc, 0, sizeof(desc)); for(unsigned i = 0; i < std::min(name.size(), sizeof(desc.DeviceName) - 1); ++i) @@ -818,7 +818,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject(factory), desc(p_desc) { HRESULT hr; diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp index 69dfd403f3d..46a3905d8fc 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp @@ -126,20 +126,22 @@ struct GalliumD3D11Caps unsigned stages; }; -// used to avoid needing to have forward declarations of functions -// this is called "screen" because in the D3D10 case it's only part of the device -struct GalliumD3D11Screen - : public GalliumDXGIDevice< - GalliumMultiComObject< +typedef GalliumDXGIDevice< + GalliumMultiComObject< #if API >= 11 - GalliumPrivateDataComObject, + GalliumPrivateDataComObject, #else - GalliumPrivateDataComObject, + GalliumPrivateDataComObject, #endif - IGalliumDevice - > + IGalliumDevice > +> GalliumD3D11ScreenBase; + +// used to avoid needing to have forward declarations of functions +// this is called "screen" because in the D3D10 case it's only part of the device +struct GalliumD3D11Screen : public GalliumD3D11ScreenBase { + pipe_screen* screen; pipe_context* immediate_pipe; GalliumD3D11Caps screen_caps; @@ -159,7 +161,7 @@ struct GalliumD3D11Screen GalliumD3D11Screen(pipe_screen* screen, struct pipe_context* immediate_pipe, IDXGIAdapter* adapter) - : GalliumDXGIDevice(adapter), screen(screen), immediate_pipe(immediate_pipe) + : GalliumD3D11ScreenBase(adapter), screen(screen), immediate_pipe(immediate_pipe) { } diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h index a8573cdf686..032cb0ea841 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h @@ -119,7 +119,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl #define SYNCHRONIZED do {} while(0) GalliumD3D11DeviceContext(GalliumD3D11Screen* device, pipe_context* pipe, bool owns_pipe, unsigned context_flags = 0) - : GalliumD3D11DeviceChild(device), pipe(pipe), owns_pipe(owns_pipe), context_flags(context_flags) + : GalliumD3D11DeviceChild(device), pipe(pipe), owns_pipe(owns_pipe), context_flags(context_flags) { caps = device->screen_caps; init_context(); @@ -1988,7 +1988,7 @@ struct GalliumD3D11ImmediateDeviceContext : public GalliumD3D11DeviceContext { GalliumD3D11ImmediateDeviceContext(GalliumD3D11Screen* device, pipe_context* pipe, unsigned context_flags = 0) - : GalliumD3D11DeviceContext(device, pipe, context_flags) + : GalliumD3D11DeviceContext(device, pipe, context_flags) { // not necessary, but tests that the API at least basically works ClearState(); diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h index ad6b28fceb1..b7542fd30e4 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h @@ -684,14 +684,14 @@ struct GalliumD3D11QueryOrPredicate : public GalliumD3D11Asynchronous struct GalliumD3D11Query : public GalliumD3D11QueryOrPredicate { GalliumD3D11Query(GalliumD3D11Screen* device, struct pipe_query* query, unsigned data_size, const D3D11_QUERY_DESC& desc) - : GalliumD3D11QueryOrPredicate(device, query, data_size, desc) + : GalliumD3D11QueryOrPredicate(device, query, data_size, desc) {} }; struct GalliumD3D11Predicate : public GalliumD3D11QueryOrPredicate { GalliumD3D11Predicate(GalliumD3D11Screen* device, struct pipe_query* query, unsigned data_size, const D3D11_QUERY_DESC& desc) - : GalliumD3D11QueryOrPredicate(device, query, data_size, desc) + : GalliumD3D11QueryOrPredicate(device, query, data_size, desc) {} ~GalliumD3D11Predicate() @@ -704,7 +704,7 @@ struct GalliumD3D11Counter : public GalliumD3D11Asynchronous { D3D11_COUNTER_DESC desc; GalliumD3D11Counter(GalliumD3D11Screen* device, struct pipe_query* query, unsigned data_size, const D3D11_COUNTER_DESC& desc) - : GalliumD3D11Asynchronous(device, query, data_size), desc(desc) + : GalliumD3D11Asynchronous(device, query, data_size), desc(desc) {} virtual void STDMETHODCALLTYPE GetDesc( -- 2.30.2