diff options
Diffstat (limited to 'src/gallium')
32 files changed, 1584 insertions, 1585 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h b/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h index 06a078af6e..5c7c87e5e8 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h @@ -33,7 +33,7 @@ #include <iostream> #include "le32.h" -#define FOURCC(a, b, c, d) ((uint32_t)(uint8_t)(a) | ((uint32_t)(uint8_t)(b) << 8) | ((uint32_t)(uint8_t)(c) << 16) | ((uint32_t)(uint8_t)(d) << 24 )) +#define FOURCC(a, b, c, d) ((uint32_t)(uint8_t)(a) | ((uint32_t)(uint8_t)(b) << 8) | ((uint32_t)(uint8_t)(c) << 16) | ((uint32_t)(uint8_t)(d) << 24 )) #define FOURCC_DXBC FOURCC('D', 'X', 'B', 'C') #define FOURCC_RDEF FOURCC('R', 'D', 'E', 'F') #define FOURCC_ISGN FOURCC('I', 'S', 'G', 'N') @@ -100,7 +100,7 @@ static inline dxbc_chunk_header* dxbc_find_shader_bytecode(const void* data, int static inline dxbc_chunk_signature* dxbc_find_signature(const void* data, int size, bool output) { - return (dxbc_chunk_signature*)dxbc_find_chunk(data, size, output ? FOURCC_OSGN : FOURCC_ISGN); + return (dxbc_chunk_signature*)dxbc_find_chunk(data, size, output ? FOURCC_OSGN : FOURCC_ISGN); } struct _D3D11_SIGNATURE_PARAMETER_DESC; diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/include/sm4.h b/src/gallium/state_trackers/d3d1x/d3d1xshader/include/sm4.h index 07f84f0c73..c8404d9691 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xshader/include/sm4.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xshader/include/sm4.h @@ -157,7 +157,7 @@ struct sm4_token_instruction }; }; -union sm4_token_instruction_extended +union sm4_token_instruction_extended { struct { diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_analyze.cpp b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_analyze.cpp index 848db1bdbb..7903d547f1 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_analyze.cpp +++ b/src/gallium/state_trackers/d3d1x/d3d1xshader/src/sm4_analyze.cpp @@ -167,7 +167,7 @@ bool sm4_allocate_resource_sampler_pairs(sm4_program& program) program.resource_sampler_to_slot[*i] = program.slot_to_resource.size(); if(!program.resource_to_slot.count(i->first)) { - program.resource_to_slot[i->first] = program.slot_to_resource.size(); + program.resource_to_slot[i->first] = program.slot_to_resource.size(); resinfos.erase(i->first); } program.slot_to_resource.push_back(i->first); @@ -177,7 +177,7 @@ bool sm4_allocate_resource_sampler_pairs(sm4_program& program) for(std::set<int>::iterator i = resinfos.begin(); i != resinfos.end(); ++i) { program.resource_sampler_to_slot[std::make_pair(*i, -1)] = program.slot_to_resource.size(); - program.resource_to_slot[*i] = program.slot_to_resource.size(); + program.resource_to_slot[*i] = program.slot_to_resource.size(); program.slot_to_resource.push_back(*i); program.slot_to_sampler.push_back(-1); } diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h index 974518a5ce..eebabaa9af 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h @@ -200,7 +200,7 @@ extern "C" * with are unsafe regarding vtable layout. * In particular, consider the case where we try to delete GalliumComObject<ID3D11Texture2D> * with a pointer to GalliumComObject<ID3D11Resource>. - * Since we think that this is a GalliumComObject<ID3D11Resource>, we'll look for the + * Since we think that this is a GalliumComObject<ID3D11Resource>, we'll look for the * destructor in the vtable slot immediately after the ID3D11Resource vtable, but this is * actually an ID3D11Texture2D function implemented by the object! * @@ -441,7 +441,7 @@ struct GalliumComObject : public Base virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void **ppvObject) + void **ppvObject) { /* see the initial comment for an explaination of this magic trick */ if(&riid == &IID_MAGIC_DELETE_THIS) @@ -487,9 +487,9 @@ struct GalliumMultiComObject : public BaseClass, SecondaryInterface return E_NOINTERFACE; } - virtual HRESULT STDMETHODCALLTYPE QueryInterface( + virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void **ppvObject) + void **ppvObject) { /* see the initial comment for an explaination of this magic trick */ if(&riid == &IID_MAGIC_DELETE_THIS) @@ -836,77 +836,77 @@ struct GalliumPrivateDataComObject : public GalliumComObject<Base, RefCnt> } HRESULT get_private_data( - __in REFGUID guid, - __inout UINT *pDataSize, - __out_bcount_opt(*pDataSize) void *pData) - { + __in REFGUID guid, + __inout UINT *pDataSize, + __out_bcount_opt(*pDataSize) void *pData) + { lock_t<mutex_t> lock(private_data_mutex); - private_data_map_t::iterator i = private_data_map.find(guid); - *pDataSize = 0; - if(i == private_data_map.end()) - return DXGI_ERROR_NOT_FOUND; - if(i->second.second == ~0u) - { - /* TODO: is GetPrivateData on interface data supposed to do this? */ - if(*pDataSize < sizeof(void*)) - return E_INVALIDARG; - if(pData) - { - memcpy(pData, &i->second.first, sizeof(void*)); + private_data_map_t::iterator i = private_data_map.find(guid); + *pDataSize = 0; + if(i == private_data_map.end()) + return DXGI_ERROR_NOT_FOUND; + if(i->second.second == ~0u) + { + /* TODO: is GetPrivateData on interface data supposed to do this? */ + if(*pDataSize < sizeof(void*)) + return E_INVALIDARG; + if(pData) + { + memcpy(pData, &i->second.first, sizeof(void*)); ((IUnknown*)i->second.first)->AddRef(); - } - *pDataSize = sizeof(void*); - } - else - { - unsigned size = std::min(*pDataSize, i->second.second); - if(pData) - memcpy(pData, i->second.first, size); - *pDataSize = size; - } - return S_OK; - } - - HRESULT set_private_data( - __in REFGUID guid, - __in UINT DataSize, - __in_bcount_opt( DataSize ) const void *pData) - { - void* p = 0; - - if(DataSize && pData) - { - p = malloc(DataSize); - if(!p) - return E_OUTOFMEMORY; - } - - lock_t<mutex_t> lock(private_data_mutex); - std::pair<void*, unsigned>& v = private_data_map[guid]; - if(v.first) - { - if(v.second == ~0u) - ((IUnknown*)v.first)->Release(); - else - free(v.first); - } - if(DataSize && pData) - { - memcpy(p, pData, DataSize); - v.first = p; - v.second = DataSize; - } - else - private_data_map.erase(guid); - return S_OK; - } - - HRESULT set_private_data_interface( - __in REFGUID guid, - __in_opt const IUnknown *pData) - { - lock_t<mutex_t> lock(private_data_mutex); - std::pair<void*, unsigned>& v = private_data_map[guid]; + } + *pDataSize = sizeof(void*); + } + else + { + unsigned size = std::min(*pDataSize, i->second.second); + if(pData) + memcpy(pData, i->second.first, size); + *pDataSize = size; + } + return S_OK; + } + + HRESULT set_private_data( + __in REFGUID guid, + __in UINT DataSize, + __in_bcount_opt( DataSize ) const void *pData) + { + void* p = 0; + + if(DataSize && pData) + { + p = malloc(DataSize); + if(!p) + return E_OUTOFMEMORY; + } + + lock_t<mutex_t> lock(private_data_mutex); + std::pair<void*, unsigned>& v = private_data_map[guid]; + if(v.first) + { + if(v.second == ~0u) + ((IUnknown*)v.first)->Release(); + else + free(v.first); + } + if(DataSize && pData) + { + memcpy(p, pData, DataSize); + v.first = p; + v.second = DataSize; + } + else + private_data_map.erase(guid); + return S_OK; + } + + HRESULT set_private_data_interface( + __in REFGUID guid, + __in_opt const IUnknown *pData) + { + lock_t<mutex_t> lock(private_data_mutex); + std::pair<void*, unsigned>& v = private_data_map[guid]; if(v.first) { if(v.second == ~0u) @@ -923,30 +923,30 @@ struct GalliumPrivateDataComObject : public GalliumComObject<Base, RefCnt> else private_data_map.erase(guid); return S_OK; - } + } virtual HRESULT STDMETHODCALLTYPE GetPrivateData( - __in REFGUID guid, - __inout UINT *pDataSize, - __out_bcount_opt(*pDataSize) void *pData) - { + __in REFGUID guid, + __inout UINT *pDataSize, + __out_bcount_opt(*pDataSize) void *pData) + { return get_private_data(guid, pDataSize, pData); - } - - virtual HRESULT STDMETHODCALLTYPE SetPrivateData( - __in REFGUID guid, - __in UINT DataSize, - __in_bcount_opt( DataSize ) const void *pData) - { - return set_private_data(guid, DataSize, pData); - } - - virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( - __in REFGUID guid, - __in_opt const IUnknown *pData) - { - return set_private_data_interface(guid, pData); - } + } + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + __in REFGUID guid, + __in UINT DataSize, + __in_bcount_opt( DataSize ) const void *pData) + { + return set_private_data(guid, DataSize, pData); + } + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + __in REFGUID guid, + __in_opt const IUnknown *pData) + { + return set_private_data_interface(guid, pData); + } }; template<typename BaseClass, typename SecondaryInterface> @@ -954,27 +954,27 @@ struct GalliumMultiPrivateDataComObject : public GalliumMultiComObject<BaseClass { // we could avoid this duplication, but the increased complexity to do so isn't worth it virtual HRESULT STDMETHODCALLTYPE GetPrivateData( - __in REFGUID guid, - __inout UINT *pDataSize, - __out_bcount_opt(*pDataSize) void *pData) - { + __in REFGUID guid, + __inout UINT *pDataSize, + __out_bcount_opt(*pDataSize) void *pData) + { return BaseClass::get_private_data(guid, pDataSize, pData); - } - - virtual HRESULT STDMETHODCALLTYPE SetPrivateData( - __in REFGUID guid, - __in UINT DataSize, - __in_bcount_opt( DataSize ) const void *pData) - { - return BaseClass::set_private_data(guid, DataSize, pData); - } - - virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( - __in REFGUID guid, - __in_opt const IUnknown *pData) - { - return BaseClass::set_private_data_interface(guid, pData); - } + } + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + __in REFGUID guid, + __in UINT DataSize, + __in_bcount_opt( DataSize ) const void *pData) + { + return BaseClass::set_private_data(guid, DataSize, pData); + } + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + __in REFGUID guid, + __in_opt const IUnknown *pData) + { + return BaseClass::set_private_data_interface(guid, pData); + } }; #define DXGI_FORMAT_COUNT 100 @@ -1014,23 +1014,23 @@ struct GalliumDXGIDevice : public GalliumMultiPrivateDataComObject<Base, IDXGIDe adapter = p_adapter; } - virtual HRESULT STDMETHODCALLTYPE GetParent( - __in REFIID riid, - __out void **ppParent) - { - return adapter.p->QueryInterface(riid, ppParent); - } + virtual HRESULT STDMETHODCALLTYPE GetParent( + __in REFIID riid, + __out void **ppParent) + { + return adapter.p->QueryInterface(riid, ppParent); + } virtual HRESULT STDMETHODCALLTYPE GetAdapter( - __out IDXGIAdapter **pAdapter) + __out IDXGIAdapter **pAdapter) { *pAdapter = adapter.ref(); return S_OK; } virtual HRESULT STDMETHODCALLTYPE QueryResourceResidency( - __in_ecount(NumResources) IUnknown *const *ppResources, - __out_ecount(NumResources) DXGI_RESIDENCY *pResidencyStatus, + __in_ecount(NumResources) IUnknown *const *ppResources, + __out_ecount(NumResources) DXGI_RESIDENCY *pResidencyStatus, UINT NumResources) { for(unsigned i = 0; i < NumResources; ++i) @@ -1046,7 +1046,7 @@ struct GalliumDXGIDevice : public GalliumMultiPrivateDataComObject<Base, IDXGIDe } virtual HRESULT STDMETHODCALLTYPE GetGPUThreadPriority( - __out INT *pPriority) + __out INT *pPriority) { *pPriority = priority; return S_OK; @@ -1060,12 +1060,12 @@ struct GalliumDXGIDevice : public GalliumMultiPrivateDataComObject<Base, IDXGIDe return S_OK; } - virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency( - UINT MaxLatency) - { - max_latency = MaxLatency; - return S_OK; - } + virtual HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency( + UINT MaxLatency) + { + max_latency = MaxLatency; + return S_OK; + } }; COM_INTERFACE(ID3D10Blob, IUnknown); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl index b507e09890..94da622b32 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl @@ -60,9 +60,9 @@ typedef enum D3D10_FEATURE_LEVEL1 { D3D10_FEATURE_LEVEL_10_0 = 0xa000, D3D10_FEATURE_LEVEL_10_1 = 0xa100, - D3D10_FEATURE_LEVEL_9_1 = 0x9100, - D3D10_FEATURE_LEVEL_9_2 = 0x9200, - D3D10_FEATURE_LEVEL_9_3 = 0x9300 + D3D10_FEATURE_LEVEL_9_1 = 0x9100, + D3D10_FEATURE_LEVEL_9_2 = 0x9200, + D3D10_FEATURE_LEVEL_9_3 = 0x9300 } D3D10_FEATURE_LEVEL1; typedef struct D3D10_RENDER_TARGET_BLEND_DESC1 @@ -139,17 +139,17 @@ interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView interface ID3D10Device1 : ID3D10Device { HRESULT CreateShaderResourceView1( - [in] ID3D10Resource *pResource, - [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, + [in] ID3D10Resource *pResource, + [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, [out,optional] ID3D10ShaderResourceView1 **ppSRView ); - - HRESULT CreateBlendState1( - [in] const D3D10_BLEND_DESC1 *pBlendStateDesc, + + HRESULT CreateBlendState1( + [in] const D3D10_BLEND_DESC1 *pBlendStateDesc, [out, optional] ID3D10BlendState1 **ppBlendState ); - D3D10_FEATURE_LEVEL1 GetFeatureLevel(); + D3D10_FEATURE_LEVEL1 GetFeatureLevel(); }; //cpp_quote("#include \"d3d10_1shader.h\"") diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h index d2241e643e..4f866ff415 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10misc.h @@ -8,7 +8,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public @@ -26,19 +26,19 @@ extern "C" { #endif typedef enum D3D10_DRIVER_TYPE { - D3D10_DRIVER_TYPE_HARDWARE = 0, - D3D10_DRIVER_TYPE_REFERENCE = 1, - D3D10_DRIVER_TYPE_NULL = 2, - D3D10_DRIVER_TYPE_SOFTWARE = 3, - D3D10_DRIVER_TYPE_WARP = 5, // added by Luca Barbieri in Sep 2010 + D3D10_DRIVER_TYPE_HARDWARE = 0, + D3D10_DRIVER_TYPE_REFERENCE = 1, + D3D10_DRIVER_TYPE_NULL = 2, + D3D10_DRIVER_TYPE_SOFTWARE = 3, + D3D10_DRIVER_TYPE_WARP = 5, // added by Luca Barbieri in Sep 2010 } D3D10_DRIVER_TYPE; HRESULT WINAPI D3D10CreateDevice(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, - HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device); + HMODULE swrast, UINT flags, UINT sdk_version, ID3D10Device **device); HRESULT WINAPI D3D10CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D10_DRIVER_TYPE driver_type, - HMODULE swrast, UINT flags, UINT sdk_version, DXGI_SWAP_CHAIN_DESC *swapchain_desc, - IDXGISwapChain **swapchain, ID3D10Device **device); + HMODULE swrast, UINT flags, UINT sdk_version, DXGI_SWAP_CHAIN_DESC *swapchain_desc, + IDXGISwapChain **swapchain, ID3D10Device **device); #ifdef __cplusplus } diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl index c4668a87dd..d3f8b75db8 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl @@ -182,15 +182,15 @@ interface ID3D10ShaderReflectionType ); ID3D10ShaderReflectionType* GetMemberTypeByIndex( - [in] UINT Index + [in] UINT Index ); ID3D10ShaderReflectionType* GetMemberTypeByName( - [in] LPCSTR Name + [in] LPCSTR Name ); LPCSTR GetMemberTypeName( - [in] UINT Index + [in] UINT Index ); }; @@ -214,11 +214,11 @@ interface ID3D10ShaderReflectionConstantBuffer ); ID3D10ShaderReflectionVariable* GetVariableByIndex( - [in] UINT Index + [in] UINT Index ); ID3D10ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR Name ); }; @@ -230,39 +230,39 @@ interface ID3D10ShaderReflection : IUnknown ); ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByIndex( - [in] UINT Index + [in] UINT Index ); ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByName( - [in] LPCSTR Name + [in] LPCSTR Name ); HRESULT GetResourceBindingDesc( - [in] UINT ResourceIndex, + [in] UINT ResourceIndex, [out] D3D10_SHADER_INPUT_BIND_DESC *pDesc ); HRESULT GetInputParameterDesc( - [in] UINT ParameterIndex, + [in] UINT ParameterIndex, [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc ); HRESULT GetOutputParameterDesc ( - [in] UINT ParameterIndex, + [in] UINT ParameterIndex, [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc ); }; HRESULT D3D10CompileShader(LPCSTR pSrcData, SIZE_T SrcDataLen, LPCSTR pFileName, const D3D10_SHADER_MACRO* pDefines, LPD3D10INCLUDE pInclude, - LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs); + LPCSTR pFunctionName, LPCSTR pProfile, UINT Flags, ID3D10Blob** ppShader, ID3D10Blob** ppErrorMsgs); HRESULT D3D10DisassembleShader(const void *pShader, SIZE_T BytecodeLength, BOOL EnableColorCode, LPCSTR pComments, ID3D10Blob** ppDisassembly); LPCSTR D3D10GetPixelShaderProfile(ID3D10Device *pDevice); LPCSTR D3D10GetVertexShaderProfile(ID3D10Device *pDevice); LPCSTR D3D10GetGeometryShaderProfile(ID3D10Device *pDevice); HRESULT D3D10ReflectShader(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10ShaderReflection **ppReflector); HRESULT D3D10PreprocessShader(LPCSTR pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, const D3D10_SHADER_MACRO* pDefines, - LPD3D10INCLUDE pInclude, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs); + LPD3D10INCLUDE pInclude, ID3D10Blob** ppShaderText, ID3D10Blob** ppErrorMsgs); HRESULT D3D10GetInputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob); HRESULT D3D10GetOutputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob); HRESULT D3D10GetInputAndOutputSignatureBlob(const void *pShaderBytecode, SIZE_T BytecodeLength, ID3D10Blob **ppSignatureBlob); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl index 5a57da36ee..d916c20f19 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl @@ -1339,20 +1339,20 @@ interface ID3D11DeviceChild : IUnknown { ); HRESULT GetPrivateData( - [in] REFGUID guid, + [in] REFGUID guid, [in, out] UINT *pDataSize, [out] void *pData ); HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT DataSize, - [in] const void *pData + [in] REFGUID guid, + [in] UINT DataSize, + [in] const void *pData ); HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *pData + [in] REFGUID guid, + [in] const IUnknown *pData ); }; @@ -1398,7 +1398,7 @@ interface ID3D11Resource : ID3D11DeviceChild { ); void SetEvictionPriority( - [in] UINT EvictionPriority + [in] UINT EvictionPriority ); UINT GetEvictionPriority( @@ -1559,17 +1559,17 @@ interface ID3D11ClassInstance : ID3D11DeviceChild interface ID3D11ClassLinkage : ID3D11DeviceChild { HRESULT GetClassInstance( - [in] LPCSTR pClassInstanceName, - [in] UINT InstanceIndex, + [in] LPCSTR pClassInstanceName, + [in] UINT InstanceIndex, [out] ID3D11ClassInstance **ppInstance ); HRESULT CreateClassInstance( - [in] LPCSTR pClassTypeName, - [in] UINT ConstantBufferOffset, - [in] UINT ConstantVectorOffset, - [in] UINT TextureOffset, - [in] UINT SamplerOffset, + [in] LPCSTR pClassTypeName, + [in] UINT ConstantBufferOffset, + [in] UINT ConstantVectorOffset, + [in] UINT TextureOffset, + [in] UINT SamplerOffset, [out] ID3D11ClassInstance **ppInstance ); }; @@ -1586,112 +1586,112 @@ interface ID3D11DeviceContext; interface ID3D11Device : IUnknown { HRESULT CreateBuffer( - [in] const D3D11_BUFFER_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, + [in] const D3D11_BUFFER_DESC *pDesc, + [in] const D3D11_SUBRESOURCE_DATA *pInitialData, [out] ID3D11Buffer **ppBuffer ); HRESULT CreateTexture1D( - [in] const D3D11_TEXTURE1D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, + [in] const D3D11_TEXTURE1D_DESC *pDesc, + [in] const D3D11_SUBRESOURCE_DATA *pInitialData, [out] ID3D11Texture1D **ppTexture1D ); HRESULT CreateTexture2D( - [in] const D3D11_TEXTURE2D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, + [in] const D3D11_TEXTURE2D_DESC *pDesc, + [in] const D3D11_SUBRESOURCE_DATA *pInitialData, [out] ID3D11Texture2D **ppTexture2D ); HRESULT CreateTexture3D( - [in] const D3D11_TEXTURE3D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, + [in] const D3D11_TEXTURE3D_DESC *pDesc, + [in] const D3D11_SUBRESOURCE_DATA *pInitialData, [out] ID3D11Texture3D **ppTexture3D ); HRESULT CreateShaderResourceView( - [in] ID3D11Resource *pResource, - [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + [in] ID3D11Resource *pResource, + [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, [out] ID3D11ShaderResourceView **ppSRView ); HRESULT CreateUnorderedAccessView( - [in] ID3D11Resource *pResource, - [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + [in] ID3D11Resource *pResource, + [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, [out] ID3D11UnorderedAccessView **ppUAView ); HRESULT CreateRenderTargetView( - [in] ID3D11Resource *pResource, - [in] const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + [in] ID3D11Resource *pResource, + [in] const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, [out] ID3D11RenderTargetView **ppRTView ); HRESULT CreateDepthStencilView( - [in] ID3D11Resource *pResource, - [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + [in] ID3D11Resource *pResource, + [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, [out] ID3D11DepthStencilView **ppDepthStencilView ); HRESULT CreateInputLayout( - [in] const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, - [in] UINT NumElements, - [in] const void *pShaderBytecodeWithInputSignature, - [in] SIZE_T BytecodeLength, + [in] const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + [in] UINT NumElements, + [in] const void *pShaderBytecodeWithInputSignature, + [in] SIZE_T BytecodeLength, [out] ID3D11InputLayout **ppInputLayout ); HRESULT CreateVertexShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11VertexShader **ppVertexShader ); HRESULT CreateGeometryShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11GeometryShader **ppGeometryShader ); HRESULT CreateGeometryShaderWithStreamOutput( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, - [in] UINT NumEntries, - [in] const UINT *pBufferStrides, - [in] UINT NumStrides, - [in] UINT RasterizedStream, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + [in] UINT NumEntries, + [in] const UINT *pBufferStrides, + [in] UINT NumStrides, + [in] UINT RasterizedStream, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11GeometryShader **ppGeometryShader ); HRESULT CreatePixelShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11PixelShader **ppPixelShader ); HRESULT CreateHullShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11HullShader **ppHullShader ); HRESULT CreateDomainShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11DomainShader **ppDomainShader ); HRESULT CreateComputeShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, + [in] const void *pShaderBytecode, + [in] SIZE_T BytecodeLength, + [in] ID3D11ClassLinkage *pClassLinkage, [out] ID3D11ComputeShader **ppComputeShader ); @@ -1700,59 +1700,59 @@ interface ID3D11Device : IUnknown ); HRESULT CreateBlendState( - [in] const D3D11_BLEND_DESC *pBlendStateDesc, + [in] const D3D11_BLEND_DESC *pBlendStateDesc, [out] ID3D11BlendState **ppBlendState ); HRESULT CreateDepthStencilState( - [in] const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, + [in] const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, [out] ID3D11DepthStencilState **ppDepthStencilState ); HRESULT CreateRasterizerState( - [in] const D3D11_RASTERIZER_DESC *pRasterizerDesc, + [in] const D3D11_RASTERIZER_DESC *pRasterizerDesc, [out] ID3D11RasterizerState **ppRasterizerState ); HRESULT CreateSamplerState( - [in] const D3D11_SAMPLER_DESC *pSamplerDesc, + [in] const D3D11_SAMPLER_DESC *pSamplerDesc, [out] ID3D11SamplerState **ppSamplerState ); HRESULT CreateQuery( - [in] const D3D11_QUERY_DESC *pQueryDesc, + [in] const D3D11_QUERY_DESC *pQueryDesc, [out] ID3D11Query **ppQuery ); HRESULT CreatePredicate( - [in] const D3D11_QUERY_DESC *pPredicateDesc, + [in] const D3D11_QUERY_DESC *pPredicateDesc, [out] ID3D11Predicate **ppPredicate ); HRESULT CreateCounter( - [in] const D3D11_COUNTER_DESC *pCounterDesc, + [in] const D3D11_COUNTER_DESC *pCounterDesc, [out] ID3D11Counter **ppCounter ); HRESULT CreateDeferredContext( - [in] UINT ContextFlags, + [in] UINT ContextFlags, [out] ID3D11DeviceContext **ppDeferredContext ); HRESULT OpenSharedResource( - [in] HANDLE hResource, - [in] REFIID ReturnedInterface, + [in] HANDLE hResource, + [in] REFIID ReturnedInterface, [out] void **ppResource ); HRESULT CheckFormatSupport( - [in] DXGI_FORMAT Format, + [in] DXGI_FORMAT Format, [out] UINT *pFormatSupport ); HRESULT CheckMultisampleQualityLevels( - [in] DXGI_FORMAT Format, - [in] UINT SampleCount, + [in] DXGI_FORMAT Format, + [in] UINT SampleCount, [out] UINT *pNumQualityLevels ); @@ -1761,7 +1761,7 @@ interface ID3D11Device : IUnknown ); HRESULT CheckCounter( - [in] const D3D11_COUNTER_DESC *pDesc, + [in] const D3D11_COUNTER_DESC *pDesc, [out] D3D11_COUNTER_TYPE *pType, [out] UINT *pActiveCounters, [out] LPSTR szName, @@ -1773,26 +1773,26 @@ interface ID3D11Device : IUnknown ); HRESULT CheckFeatureSupport( - [in] D3D11_FEATURE Feature, + [in] D3D11_FEATURE Feature, [out] void *pFeatureSupportData, - [in] UINT FeatureSupportDataSize + [in] UINT FeatureSupportDataSize ); HRESULT GetPrivateData( - [in] REFGUID guid, + [in] REFGUID guid, [in, out] UINT *pDataSize, [out] void *pData ); HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT DataSize, - [in] const void *pData + [in] REFGUID guid, + [in] UINT DataSize, + [in] const void *pData ); HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *pData + [in] REFGUID guid, + [in] const IUnknown *pData ); D3D_FEATURE_LEVEL GetFeatureLevel(); @@ -1806,7 +1806,7 @@ interface ID3D11Device : IUnknown ); HRESULT SetExceptionMode( - [in] UINT RaiseFlags + [in] UINT RaiseFlags ); UINT GetExceptionMode(); @@ -1816,396 +1816,396 @@ interface ID3D11Device : IUnknown interface ID3D11DeviceContext : ID3D11DeviceChild { void VSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void PSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void PSSetShader( - [in] ID3D11PixelShader *pPixelShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11PixelShader *pPixelShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void PSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void VSSetShader( - [in] ID3D11VertexShader *pVertexShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11VertexShader *pVertexShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void DrawIndexed( - [in] UINT IndexCount, - [in] UINT StartIndexLocation, - [in] INT BaseVertexLocation + [in] UINT IndexCount, + [in] UINT StartIndexLocation, + [in] INT BaseVertexLocation ); void Draw( - [in] UINT VertexCount, - [in] UINT StartVertexLocation + [in] UINT VertexCount, + [in] UINT StartVertexLocation ); HRESULT Map( - [in] ID3D11Resource *pResource, - [in] UINT Subresource, - [in] D3D11_MAP MapType, - [in] UINT MapFlags, + [in] ID3D11Resource *pResource, + [in] UINT Subresource, + [in] D3D11_MAP MapType, + [in] UINT MapFlags, [out] D3D11_MAPPED_SUBRESOURCE *pMappedResource ); void Unmap( - [in] ID3D11Resource *pResource, - [in] UINT Subresource + [in] ID3D11Resource *pResource, + [in] UINT Subresource ); void PSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void IASetInputLayout( - [in] ID3D11InputLayout *pInputLayout + [in] ID3D11InputLayout *pInputLayout ); void IASetVertexBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppVertexBuffers, - [in] const UINT *pStrides, - [in] const UINT *pOffsets + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppVertexBuffers, + [in] const UINT *pStrides, + [in] const UINT *pOffsets ); void IASetIndexBuffer( - [in] ID3D11Buffer *pIndexBuffer, - [in] DXGI_FORMAT Format, - [in] UINT Offset + [in] ID3D11Buffer *pIndexBuffer, + [in] DXGI_FORMAT Format, + [in] UINT Offset ); void DrawIndexedInstanced( - [in] UINT IndexCountPerInstance, - [in] UINT InstanceCount, - [in] UINT StartIndexLocation, - [in] INT BaseVertexLocation, - [in] UINT StartInstanceLocation + [in] UINT IndexCountPerInstance, + [in] UINT InstanceCount, + [in] UINT StartIndexLocation, + [in] INT BaseVertexLocation, + [in] UINT StartInstanceLocation ); void DrawInstanced( - [in] UINT VertexCountPerInstance, - [in] UINT InstanceCount, - [in] UINT StartVertexLocation, - [in] UINT StartInstanceLocation + [in] UINT VertexCountPerInstance, + [in] UINT InstanceCount, + [in] UINT StartVertexLocation, + [in] UINT StartInstanceLocation ); void GSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void GSSetShader( - [in] ID3D11GeometryShader *pShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11GeometryShader *pShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void IASetPrimitiveTopology( - [in] D3D11_PRIMITIVE_TOPOLOGY Topology + [in] D3D11_PRIMITIVE_TOPOLOGY Topology ); void VSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void VSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void Begin( - [in] ID3D11Asynchronous *pAsync + [in] ID3D11Asynchronous *pAsync ); void End( - [in] ID3D11Asynchronous *pAsync + [in] ID3D11Asynchronous *pAsync ); HRESULT GetData( - [in] ID3D11Asynchronous *pAsync, + [in] ID3D11Asynchronous *pAsync, [out] void *pData, - [in] UINT DataSize, - [in] UINT GetDataFlags + [in] UINT DataSize, + [in] UINT GetDataFlags ); void SetPredication( - [in] ID3D11Predicate *pPredicate, - [in] BOOL PredicateValue + [in] ID3D11Predicate *pPredicate, + [in] BOOL PredicateValue ); void GSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void GSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void OMSetRenderTargets( - [in] UINT NumViews, - [in] ID3D11RenderTargetView *const *ppRenderTargetViews, - [in] ID3D11DepthStencilView *pDepthStencilView + [in] UINT NumViews, + [in] ID3D11RenderTargetView *const *ppRenderTargetViews, + [in] ID3D11DepthStencilView *pDepthStencilView ); void OMSetRenderTargetsAndUnorderedAccessViews( - [in] UINT NumRTVs, - [in] ID3D11RenderTargetView *const *ppRenderTargetViews, - [in] ID3D11DepthStencilView *pDepthStencilView, - [in] UINT UAVStartSlot, - [in] UINT NumUAVs, - [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, - [in] const UINT *pUAVInitialCounts + [in] UINT NumRTVs, + [in] ID3D11RenderTargetView *const *ppRenderTargetViews, + [in] ID3D11DepthStencilView *pDepthStencilView, + [in] UINT UAVStartSlot, + [in] UINT NumUAVs, + [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + [in] const UINT *pUAVInitialCounts ); void OMSetBlendState( - [in] ID3D11BlendState *pBlendState, - [in] const FLOAT BlendFactor[ 4 ], - [in] UINT SampleMask + [in] ID3D11BlendState *pBlendState, + [in] const FLOAT BlendFactor[ 4 ], + [in] UINT SampleMask ); void OMSetDepthStencilState( - [in] ID3D11DepthStencilState *pDepthStencilState, - [in] UINT StencilRef + [in] ID3D11DepthStencilState *pDepthStencilState, + [in] UINT StencilRef ); void SOSetTargets( - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppSOTargets, - [in] const UINT *pOffsets + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppSOTargets, + [in] const UINT *pOffsets ); void DrawAuto( ); void DrawIndexedInstancedIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *pBufferForArgs, + [in] UINT AlignedByteOffsetForArgs ); void DrawInstancedIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *pBufferForArgs, + [in] UINT AlignedByteOffsetForArgs ); void Dispatch( - [in] UINT ThreadGroupCountX, - [in] UINT ThreadGroupCountY, - [in] UINT ThreadGroupCountZ + [in] UINT ThreadGroupCountX, + [in] UINT ThreadGroupCountY, + [in] UINT ThreadGroupCountZ ); void DispatchIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *pBufferForArgs, + [in] UINT AlignedByteOffsetForArgs ); void RSSetState( - [in] ID3D11RasterizerState *pRasterizerState + [in] ID3D11RasterizerState *pRasterizerState ); void RSSetViewports( - [in] UINT NumViewports, - [in] const D3D11_VIEWPORT *pViewports + [in] UINT NumViewports, + [in] const D3D11_VIEWPORT *pViewports ); void RSSetScissorRects( - [in] UINT NumRects, - [in] const D3D11_RECT *pRects + [in] UINT NumRects, + [in] const D3D11_RECT *pRects ); void CopySubresourceRegion( - [in] ID3D11Resource *pDstResource, - [in] UINT DstSubresource, - [in] UINT DstX, - [in] UINT DstY, - [in] UINT DstZ, - [in] ID3D11Resource *pSrcResource, - [in] UINT SrcSubresource, - [in] const D3D11_BOX *pSrcBox + [in] ID3D11Resource *pDstResource, + [in] UINT DstSubresource, + [in] UINT DstX, + [in] UINT DstY, + [in] UINT DstZ, + [in] ID3D11Resource *pSrcResource, + [in] UINT SrcSubresource, + [in] const D3D11_BOX *pSrcBox ); void CopyResource( - [in] ID3D11Resource *pDstResource, - [in] ID3D11Resource *pSrcResource + [in] ID3D11Resource *pDstResource, + [in] ID3D11Resource *pSrcResource ); void UpdateSubresource( - [in] ID3D11Resource *pDstResource, - [in] UINT DstSubresource, - [in] const D3D11_BOX *pDstBox, - [in] const void *pSrcData, - [in] UINT SrcRowPitch, - [in] UINT SrcDepthPitch + [in] ID3D11Resource *pDstResource, + [in] UINT DstSubresource, + [in] const D3D11_BOX *pDstBox, + [in] const void *pSrcData, + [in] UINT SrcRowPitch, + [in] UINT SrcDepthPitch ); void CopyStructureCount( - [in] ID3D11Buffer *pDstBuffer, - [in] UINT DstAlignedByteOffset, - [in] ID3D11UnorderedAccessView *pSrcView + [in] ID3D11Buffer *pDstBuffer, + [in] UINT DstAlignedByteOffset, + [in] ID3D11UnorderedAccessView *pSrcView ); void ClearRenderTargetView( - [in] ID3D11RenderTargetView *pRenderTargetView, - [in] const FLOAT ColorRGBA[ 4 ] + [in] ID3D11RenderTargetView *pRenderTargetView, + [in] const FLOAT ColorRGBA[ 4 ] ); void ClearUnorderedAccessViewUint( - [in] ID3D11UnorderedAccessView *pUnorderedAccessView, - [in] const UINT Values[ 4 ] + [in] ID3D11UnorderedAccessView *pUnorderedAccessView, + [in] const UINT Values[ 4 ] ); void ClearUnorderedAccessViewFloat( - [in] ID3D11UnorderedAccessView *pUnorderedAccessView, - [in] const FLOAT Values[ 4 ] + [in] ID3D11UnorderedAccessView *pUnorderedAccessView, + [in] const FLOAT Values[ 4 ] ); void ClearDepthStencilView( - [in] ID3D11DepthStencilView *pDepthStencilView, - [in] UINT ClearFlags, - [in] FLOAT Depth, - [in] UINT8 Stencil + [in] ID3D11DepthStencilView *pDepthStencilView, + [in] UINT ClearFlags, + [in] FLOAT Depth, + [in] UINT8 Stencil ); void GenerateMips( - [in] ID3D11ShaderResourceView *pShaderResourceView + [in] ID3D11ShaderResourceView *pShaderResourceView ); void SetResourceMinLOD( - [in] ID3D11Resource *pResource, - [in] FLOAT MinLOD + [in] ID3D11Resource *pResource, + [in] FLOAT MinLOD ); FLOAT GetResourceMinLOD( - [in] ID3D11Resource *pResource + [in] ID3D11Resource *pResource ); void ResolveSubresource( - [in] ID3D11Resource *pDstResource, - [in] UINT DstSubresource, - [in] ID3D11Resource *pSrcResource, - [in] UINT SrcSubresource, - [in] DXGI_FORMAT Format + [in] ID3D11Resource *pDstResource, + [in] UINT DstSubresource, + [in] ID3D11Resource *pSrcResource, + [in] UINT SrcSubresource, + [in] DXGI_FORMAT Format ); void ExecuteCommandList( - [in] ID3D11CommandList *pCommandList, - [in] BOOL RestoreContextState + [in] ID3D11CommandList *pCommandList, + [in] BOOL RestoreContextState ); void HSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void HSSetShader( - [in] ID3D11HullShader *pHullShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11HullShader *pHullShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void HSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void HSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void DSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void DSSetShader( - [in] ID3D11DomainShader *pDomainShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11DomainShader *pDomainShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void DSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void DSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void CSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT StartSlot, + [in] UINT NumViews, + [in] ID3D11ShaderResourceView *const *ppShaderResourceViews ); void CSSetUnorderedAccessViews( - [in] UINT StartSlot, - [in] UINT NumUAVs, - [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, - [in] const UINT *pUAVInitialCounts + [in] UINT StartSlot, + [in] UINT NumUAVs, + [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + [in] const UINT *pUAVInitialCounts ); void CSSetShader( - [in] ID3D11ComputeShader *pComputeShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11ComputeShader *pComputeShader, + [in] ID3D11ClassInstance *const *ppClassInstances, + [in] UINT NumClassInstances ); void CSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT StartSlot, + [in] UINT NumSamplers, + [in] ID3D11SamplerState *const *ppSamplers ); void CSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT StartSlot, + [in] UINT NumBuffers, + [in] ID3D11Buffer *const *ppConstantBuffers ); void VSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); void PSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); @@ -2216,8 +2216,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void PSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); @@ -2228,8 +2228,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void PSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); @@ -2238,8 +2238,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void IAGetVertexBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppVertexBuffers, [out] UINT *pStrides, [out] UINT *pOffsets @@ -2252,8 +2252,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void GSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); @@ -2268,14 +2268,14 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void VSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); void VSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); @@ -2285,29 +2285,29 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void GSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); void GSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); void OMGetRenderTargets( - [in] UINT NumViews, + [in] UINT NumViews, [out] ID3D11RenderTargetView **ppRenderTargetViews, [out] ID3D11DepthStencilView **ppDepthStencilView ); void OMGetRenderTargetsAndUnorderedAccessViews( - [in] UINT NumRTVs, + [in] UINT NumRTVs, [out] ID3D11RenderTargetView **ppRenderTargetViews, [out] ID3D11DepthStencilView **ppDepthStencilView, - [in] UINT UAVStartSlot, - [in] UINT NumUAVs, + [in] UINT UAVStartSlot, + [in] UINT NumUAVs, [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews ); @@ -2323,7 +2323,7 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void SOGetTargets( - [in] UINT NumBuffers, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppSOTargets ); @@ -2342,8 +2342,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void HSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); @@ -2354,20 +2354,20 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void HSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); void HSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); void DSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); @@ -2378,26 +2378,26 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void DSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); void DSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); void CSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, + [in] UINT StartSlot, + [in] UINT NumViews, [out] ID3D11ShaderResourceView **ppShaderResourceViews ); void CSGetUnorderedAccessViews( - [in] UINT StartSlot, - [in] UINT NumUAVs, + [in] UINT StartSlot, + [in] UINT NumUAVs, [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews ); @@ -2408,14 +2408,14 @@ interface ID3D11DeviceContext : ID3D11DeviceChild ); void CSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, + [in] UINT StartSlot, + [in] UINT NumSamplers, [out] ID3D11SamplerState **ppSamplers ); void CSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, + [in] UINT StartSlot, + [in] UINT NumBuffers, [out] ID3D11Buffer **ppConstantBuffers ); @@ -2428,7 +2428,7 @@ interface ID3D11DeviceContext : ID3D11DeviceChild UINT GetContextFlags(); HRESULT FinishCommandList( - [in] BOOL RestoreDeferredContextState, + [in] BOOL RestoreDeferredContextState, [out] ID3D11CommandList **ppCommandList ); }; diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl index 09588a02f5..cf4ae1b68e 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl @@ -160,31 +160,31 @@ interface ID3D11ShaderReflectionType ); ID3D11ShaderReflectionType* GetMemberTypeByIndex( - [in] UINT Index + [in] UINT Index ); ID3D11ShaderReflectionType* GetMemberTypeByName( - [in] LPCSTR Name + [in] LPCSTR Name ); LPCSTR GetMemberTypeName( - [in] UINT Index + [in] UINT Index ); HRESULT IsEqual( - [in] ID3D11ShaderReflectionType* pType + [in] ID3D11ShaderReflectionType* pType ); ID3D11ShaderReflectionType* GetSubType(); ID3D11ShaderReflectionType* GetBaseClass(); UINT GetNumInterfaces(); ID3D11ShaderReflectionType* GetInterfaceByIndex( - [in] UINT uIndex + [in] UINT uIndex ); HRESULT IsOfType( - [in] ID3D11ShaderReflectionType* pType + [in] ID3D11ShaderReflectionType* pType ); HRESULT ImplementsInterface( - [in] ID3D11ShaderReflectionType* pBase + [in] ID3D11ShaderReflectionType* pBase ); }; @@ -201,7 +201,7 @@ interface ID3D11ShaderReflectionVariable ID3D11ShaderReflectionConstantBuffer* GetBuffer(); UINT GetInterfaceSlot( - [in] UINT uArrayIndex + [in] UINT uArrayIndex ); }; @@ -213,11 +213,11 @@ interface ID3D11ShaderReflectionConstantBuffer ); ID3D11ShaderReflectionVariable* GetVariableByIndex( - [in] UINT Index + [in] UINT Index ); ID3D11ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR Name ); }; @@ -229,40 +229,40 @@ interface ID3D11ShaderReflection ); ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByIndex( - [in] UINT Index + [in] UINT Index ); ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByName( - [in] LPCSTR Name + [in] LPCSTR Name ); HRESULT GetResourceBindingDesc( - [in] UINT ResourceIndex, + [in] UINT ResourceIndex, [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc ); HRESULT GetInputParameterDesc( - [in] UINT ParameterIndex, + [in] UINT ParameterIndex, [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc ); HRESULT GetOutputParameterDesc ( - [in] UINT ParameterIndex, + [in] UINT ParameterIndex, [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc ); HRESULT GetPatchConstantParameterDesc( - [in] UINT ParameterIndex, + [in] UINT ParameterIndex, [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc ); ID3D11ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR Name ); HRESULT GetResourceBindingDescByName( - [in] LPCSTR Name, + [in] LPCSTR Name, [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc ); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl index 71021b8a6c..d95a351eaf 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl @@ -333,14 +333,14 @@ typedef enum _D3D_INCLUDE_TYPE interface ID3DInclude : IUnknown { HRESULT Open( - [in] D3D_INCLUDE_TYPE IncludeType, - [in] LPCSTR pFileName, - [in] LPCVOID pParentData, + [in] D3D_INCLUDE_TYPE IncludeType, + [in] LPCSTR pFileName, + [in] LPCVOID pParentData, [out] LPCVOID *ppData, - [in] UINT *pBytes + [in] UINT *pBytes ); HRESULT Close( - [in] LPCVOID pData + [in] LPCVOID pData ); }; @@ -381,7 +381,7 @@ typedef enum _D3D_SHADER_VARIABLE_FLAGS D3D_SVF_FORCE_DWORD = 0x7fffffff } D3D_SHADER_VARIABLE_FLAGS; -typedef enum _D3D_SHADER_VARIABLE_TYPE +typedef enum _D3D_SHADER_VARIABLE_TYPE { D3D_SVT_VOID = 0, D3D_SVT_BOOL, @@ -493,7 +493,7 @@ typedef enum _D3D_SHADER_VARIABLE_TYPE D3D_SVT_FORCE_DWORD = 0x7fffffff } D3D_SHADER_VARIABLE_TYPE; -typedef enum _D3D_SHADER_INPUT_FLAGS +typedef enum _D3D_SHADER_INPUT_FLAGS { D3D_SIF_USERPACKED = 1, D3D_SIF_COMPARISON_SAMPLER = 2, @@ -508,7 +508,7 @@ typedef enum _D3D_SHADER_INPUT_FLAGS D3D10_SIF_TEXTURE_COMPONENTS = 12, D3D_SIF_FORCE_DWORD = 0x7fffffff - } D3D_SHADER_INPUT_FLAGS; + } D3D_SHADER_INPUT_FLAGS; typedef enum _D3D_SHADER_INPUT_TYPE { @@ -538,9 +538,9 @@ typedef enum _D3D_SHADER_INPUT_TYPE D3D11_SIT_UAV_APPEND_STRUCTURED, D3D11_SIT_UAV_CONSUME_STRUCTURED, D3D11_SIT_UAV_RWSTRUCTURED_WITH_COUNTER, - } D3D_SHADER_INPUT_TYPE; + } D3D_SHADER_INPUT_TYPE; -typedef enum _D3D_SHADER_CBUFFER_FLAGS +typedef enum _D3D_SHADER_CBUFFER_FLAGS { D3D_CBF_USERPACKED = 1, @@ -549,7 +549,7 @@ typedef enum _D3D_SHADER_CBUFFER_FLAGS D3D_CBF_FORCE_DWORD = 0x7fffffff } D3D_SHADER_CBUFFER_FLAGS; -typedef enum _D3D_CBUFFER_TYPE +typedef enum _D3D_CBUFFER_TYPE { D3D_CT_CBUFFER = 0, D3D_CT_TBUFFER, @@ -646,7 +646,7 @@ typedef enum D3D_RESOURCE_RETURN_TYPE D3D11_RETURN_TYPE_CONTINUED, } D3D_RESOURCE_RETURN_TYPE; -typedef enum D3D_REGISTER_COMPONENT_TYPE +typedef enum D3D_REGISTER_COMPONENT_TYPE { D3D_REGISTER_COMPONENT_UNKNOWN = 0, D3D_REGISTER_COMPONENT_UINT32, @@ -659,7 +659,7 @@ typedef enum D3D_REGISTER_COMPONENT_TYPE D3D10_REGISTER_COMPONENT_FLOAT32, } D3D_REGISTER_COMPONENT_TYPE; -typedef enum D3D_TESSELLATOR_DOMAIN +typedef enum D3D_TESSELLATOR_DOMAIN { D3D_TESSELLATOR_DOMAIN_UNDEFINED = 0, D3D_TESSELLATOR_DOMAIN_ISOLINE, @@ -687,7 +687,7 @@ typedef enum D3D_TESSELLATOR_PARTITIONING D3D11_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN, } D3D_TESSELLATOR_PARTITIONING; -typedef enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE +typedef enum D3D_TESSELLATOR_OUTPUT_PRIMITIVE { D3D_TESSELLATOR_OUTPUT_UNDEFINED = 0, D3D_TESSELLATOR_OUTPUT_POINT, diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl index d268e43c0d..247a7ddd11 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl @@ -8,7 +8,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public @@ -22,345 +22,345 @@ import "dxgitype.idl"; const UINT _FACDXGI = 0x87a; -cpp_quote("#define MAKE_DXGI_STATUS(x) MAKE_HRESULT(0, _FACDXGI, x)") -cpp_quote("#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1)") -cpp_quote("#define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2)") -cpp_quote("#define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4)") -cpp_quote("#define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5)") -cpp_quote("#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6)") -cpp_quote("#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7)") -cpp_quote("#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8)") - -cpp_quote("#define MAKE_DXGI_HRESULT(x) MAKE_HRESULT(1, _FACDXGI, x)") -cpp_quote("#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)") -cpp_quote("#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2)") -cpp_quote("#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3)") -cpp_quote("#define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4)") -cpp_quote("#define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5)") -cpp_quote("#define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6)") -cpp_quote("#define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7)") -cpp_quote("#define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10)") -cpp_quote("#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11)") -cpp_quote("#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12)") -cpp_quote("#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32)") -cpp_quote("#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33)") -cpp_quote("#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34)") +cpp_quote("#define MAKE_DXGI_STATUS(x) MAKE_HRESULT(0, _FACDXGI, x)") +cpp_quote("#define DXGI_STATUS_OCCLUDED MAKE_DXGI_STATUS(1)") +cpp_quote("#define DXGI_STATUS_CLIPPED MAKE_DXGI_STATUS(2)") +cpp_quote("#define DXGI_STATUS_NO_REDIRECTION MAKE_DXGI_STATUS(4)") +cpp_quote("#define DXGI_STATUS_NO_DESKTOP_ACCESS MAKE_DXGI_STATUS(5)") +cpp_quote("#define DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_STATUS(6)") +cpp_quote("#define DXGI_STATUS_MODE_CHANGED MAKE_DXGI_STATUS(7)") +cpp_quote("#define DXGI_STATUS_MODE_CHANGE_IN_PROGRESS MAKE_DXGI_STATUS(8)") + +cpp_quote("#define MAKE_DXGI_HRESULT(x) MAKE_HRESULT(1, _FACDXGI, x)") +cpp_quote("#define DXGI_ERROR_INVALID_CALL MAKE_DXGI_HRESULT(1)") +cpp_quote("#define DXGI_ERROR_NOT_FOUND MAKE_DXGI_HRESULT(2)") +cpp_quote("#define DXGI_ERROR_MORE_DATA MAKE_DXGI_HRESULT(3)") +cpp_quote("#define DXGI_ERROR_UNSUPPORTED MAKE_DXGI_HRESULT(4)") +cpp_quote("#define DXGI_ERROR_DEVICE_REMOVED MAKE_DXGI_HRESULT(5)") +cpp_quote("#define DXGI_ERROR_DEVICE_HUNG MAKE_DXGI_HRESULT(6)") +cpp_quote("#define DXGI_ERROR_DEVICE_RESET MAKE_DXGI_HRESULT(7)") +cpp_quote("#define DXGI_ERROR_WAS_STILL_DRAWING MAKE_DXGI_HRESULT(10)") +cpp_quote("#define DXGI_ERROR_FRAME_STATISTICS_DISJOINT MAKE_DXGI_HRESULT(11)") +cpp_quote("#define DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE MAKE_DXGI_HRESULT(12)") +cpp_quote("#define DXGI_ERROR_DRIVER_INTERNAL_ERROR MAKE_DXGI_HRESULT(32)") +cpp_quote("#define DXGI_ERROR_NONEXCLUSIVE MAKE_DXGI_HRESULT(33)") +cpp_quote("#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE MAKE_DXGI_HRESULT(34)") cpp_quote("#if 0") typedef HANDLE HMONITOR; typedef struct _LUID { - DWORD LowPart; - LONG HighPart; + DWORD LowPart; + LONG HighPart; } LUID, *PLUID; cpp_quote("#endif") typedef UINT DXGI_USAGE; -const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L; -const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L; -const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L; -const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L; -const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L; +const DXGI_USAGE DXGI_USAGE_SHADER_INPUT = 0x10L; +const DXGI_USAGE DXGI_USAGE_RENDER_TARGET_OUTPUT = 0x20L; +const DXGI_USAGE DXGI_USAGE_BACK_BUFFER = 0x40L; +const DXGI_USAGE DXGI_USAGE_SHARED = 0x80L; +const DXGI_USAGE DXGI_USAGE_READ_ONLY = 0x100L; typedef enum DXGI_SWAP_EFFECT { - DXGI_SWAP_EFFECT_DISCARD = 0, - DXGI_SWAP_EFFECT_SEQUENTIAL = 1, + DXGI_SWAP_EFFECT_DISCARD = 0, + DXGI_SWAP_EFFECT_SEQUENTIAL = 1, } DXGI_SWAP_EFFECT; typedef enum DXGI_RESIDENCY { - DXGI_RESIDENCY_FULLY_RESIDENT = 1, - DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2, - DXGI_RESIDENCY_EVICTED_TO_DISK = 3, + DXGI_RESIDENCY_FULLY_RESIDENT = 1, + DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY = 2, + DXGI_RESIDENCY_EVICTED_TO_DISK = 3, } DXGI_RESIDENCY; typedef struct DXGI_SURFACE_DESC { - UINT Width; - UINT Height; - DXGI_FORMAT Format; - DXGI_SAMPLE_DESC SampleDesc; + UINT Width; + UINT Height; + DXGI_FORMAT Format; + DXGI_SAMPLE_DESC SampleDesc; } DXGI_SURFACE_DESC; typedef struct DXGI_MAPPED_RECT { - INT Pitch; - BYTE *pBits; + INT Pitch; + BYTE *pBits; } DXGI_MAPPED_RECT; typedef struct DXGI_OUTPUT_DESC { - WCHAR DeviceName[32]; - RECT DesktopCoordinates; - BOOL AttachedToDesktop; - DXGI_MODE_ROTATION Rotation; - HMONITOR Monitor; + WCHAR DeviceName[32]; + RECT DesktopCoordinates; + BOOL AttachedToDesktop; + DXGI_MODE_ROTATION Rotation; + HMONITOR Monitor; } DXGI_OUTPUT_DESC; typedef struct DXGI_FRAME_STATISTICS { - UINT PresentCount; - UINT PresentRefreshCount; - UINT SyncRefreshCount; - LARGE_INTEGER SyncQPCTime; - LARGE_INTEGER SyncGPUTime; + UINT PresentCount; + UINT PresentRefreshCount; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + LARGE_INTEGER SyncGPUTime; } DXGI_FRAME_STATISTICS; typedef struct DXGI_ADAPTER_DESC { - WCHAR Description[128]; - UINT VendorId; - UINT DeviceId; - UINT SubSysId; - UINT Revision; - SIZE_T DedicatedVideoMemory; - SIZE_T DedicatedSystemMemory; - SIZE_T SharedSystemMemory; - LUID AdapterLuid; + WCHAR Description[128]; + UINT VendorId; + UINT DeviceId; + UINT SubSysId; + UINT Revision; + SIZE_T DedicatedVideoMemory; + SIZE_T DedicatedSystemMemory; + SIZE_T SharedSystemMemory; + LUID AdapterLuid; } DXGI_ADAPTER_DESC; typedef struct DXGI_SWAP_CHAIN_DESC { - DXGI_MODE_DESC BufferDesc; - DXGI_SAMPLE_DESC SampleDesc; - DXGI_USAGE BufferUsage; - UINT BufferCount; - HWND OutputWindow; - BOOL Windowed; - DXGI_SWAP_EFFECT SwapEffect; - UINT Flags; + DXGI_MODE_DESC BufferDesc; + DXGI_SAMPLE_DESC SampleDesc; + DXGI_USAGE BufferUsage; + UINT BufferCount; + HWND OutputWindow; + BOOL Windowed; + DXGI_SWAP_EFFECT SwapEffect; + UINT Flags; } DXGI_SWAP_CHAIN_DESC; typedef struct DXGI_SHARED_RESOURCE { - HANDLE Handle; + HANDLE Handle; } DXGI_SHARED_RESOURCE; [ - object, - local, - uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e) + object, + local, + uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e) ] interface IDXGIObject : IUnknown { - HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT data_size, - [in] const void *data - ); - HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *object - ); - HRESULT GetPrivateData( - [in] REFGUID guid, - [in, out] UINT *data_size, - [out] void *data - ); - HRESULT GetParent( - [in] REFIID riid, - [out] void **parent - ); + HRESULT SetPrivateData( + [in] REFGUID guid, + [in] UINT data_size, + [in] const void *data + ); + HRESULT SetPrivateDataInterface( + [in] REFGUID guid, + [in] const IUnknown *object + ); + HRESULT GetPrivateData( + [in] REFGUID guid, + [in, out] UINT *data_size, + [out] void *data + ); + HRESULT GetParent( + [in] REFIID riid, + [out] void **parent + ); } [ - object, - local, - uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6) + object, + local, + uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6) ] interface IDXGIDeviceSubObject : IDXGIObject { - HRESULT GetDevice( - [in] REFIID riid, - [out] void **device - ); + HRESULT GetDevice( + [in] REFIID riid, + [out] void **device + ); } [ - object, - local, - uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec) + object, + local, + uuid(cafcb56c-6ac3-4889-bf47-9e23bbd260ec) ] interface IDXGISurface : IDXGIDeviceSubObject { - HRESULT GetDesc( - [out] DXGI_SURFACE_DESC *desc - ); - HRESULT Map( - [out] DXGI_MAPPED_RECT *mapped_rect, - [in] UINT flags - ); - HRESULT Unmap( - ); + HRESULT GetDesc( + [out] DXGI_SURFACE_DESC *desc + ); + HRESULT Map( + [out] DXGI_MAPPED_RECT *mapped_rect, + [in] UINT flags + ); + HRESULT Unmap( + ); } [ - object, - local, - uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa) + object, + local, + uuid(ae02eedb-c735-4690-8d52-5a8dc20213aa) ] interface IDXGIOutput : IDXGIObject { - HRESULT GetDesc( - [out] DXGI_OUTPUT_DESC *desc - ); - HRESULT GetDisplayModeList( - [in] DXGI_FORMAT format, - [in] UINT flags, - [in, out] UINT *mode_count, - [out] DXGI_MODE_DESC *desc - ); - HRESULT FindClosestMatchingMode( - [in] const DXGI_MODE_DESC *mode, - [out] DXGI_MODE_DESC *closest_match, - [in] IUnknown *device - ); - HRESULT WaitForVBlank( - ); - HRESULT TakeOwnership( - [in] IUnknown *device, - [in] BOOL exclusive - ); - void ReleaseOwnership( - ); - HRESULT GetGammaControlCapabilities( - [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps - ); - HRESULT SetGammaControl( - [in] const DXGI_GAMMA_CONTROL *gamma_control - ); - HRESULT GetGammaControl( - [out] DXGI_GAMMA_CONTROL *gamma_control - ); - HRESULT SetDisplaySurface( - [in] IDXGISurface *surface - ); - HRESULT GetDisplaySurfaceData( - [in] IDXGISurface *surface - ); - HRESULT GetFrameStatistics( - [out] DXGI_FRAME_STATISTICS *stats - ); + HRESULT GetDesc( + [out] DXGI_OUTPUT_DESC *desc + ); + HRESULT GetDisplayModeList( + [in] DXGI_FORMAT format, + [in] UINT flags, + [in, out] UINT *mode_count, + [out] DXGI_MODE_DESC *desc + ); + HRESULT FindClosestMatchingMode( + [in] const DXGI_MODE_DESC *mode, + [out] DXGI_MODE_DESC *closest_match, + [in] IUnknown *device + ); + HRESULT WaitForVBlank( + ); + HRESULT TakeOwnership( + [in] IUnknown *device, + [in] BOOL exclusive + ); + void ReleaseOwnership( + ); + HRESULT GetGammaControlCapabilities( + [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps + ); + HRESULT SetGammaControl( + [in] const DXGI_GAMMA_CONTROL *gamma_control + ); + HRESULT GetGammaControl( + [out] DXGI_GAMMA_CONTROL *gamma_control + ); + HRESULT SetDisplaySurface( + [in] IDXGISurface *surface + ); + HRESULT GetDisplaySurfaceData( + [in] IDXGISurface *surface + ); + HRESULT GetFrameStatistics( + [out] DXGI_FRAME_STATISTICS *stats + ); } [ - object, - local, - uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0) + object, + local, + uuid(2411e7e1-12ac-4ccf-bd14-9798e8534dc0) ] interface IDXGIAdapter : IDXGIObject { - HRESULT EnumOutputs( - [in] UINT output_idx, - [in, out] IDXGIOutput **output - ); - HRESULT GetDesc( - [out] DXGI_ADAPTER_DESC *desc - ); - HRESULT CheckInterfaceSupport( - [in] REFGUID guid, - [out] LARGE_INTEGER *umd_version - ); + HRESULT EnumOutputs( + [in] UINT output_idx, + [in, out] IDXGIOutput **output + ); + HRESULT GetDesc( + [out] DXGI_ADAPTER_DESC *desc + ); + HRESULT CheckInterfaceSupport( + [in] REFGUID guid, + [out] LARGE_INTEGER *umd_version + ); } [ - object, - local, - uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a) + object, + local, + uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a) ] interface IDXGISwapChain : IDXGIDeviceSubObject { - HRESULT Present( - [in] UINT sync_interval, - [in] UINT flags - ); - HRESULT GetBuffer( - [in] UINT buffer_idx, - [in] REFIID riid, - [in, out] void **surface - ); - HRESULT SetFullscreenState( - [in] BOOL fullscreen, - [in] IDXGIOutput *target - ); - HRESULT GetFullscreenState( - [out] BOOL *fullscreen, - [out] IDXGIOutput **target - ); - HRESULT GetDesc( - [out] DXGI_SWAP_CHAIN_DESC *desc - ); - HRESULT ResizeBuffers( - [in] UINT buffer_count, - [in] UINT width, - [in] UINT height, - [in] DXGI_FORMAT format, - [in] UINT flags - ); - HRESULT ResizeTarget( - [in] const DXGI_MODE_DESC *target_mode_desc - ); - HRESULT GetContainingOutput( - [out] IDXGIOutput **output - ); - HRESULT GetFrameStatistics( - [out] DXGI_FRAME_STATISTICS *stats - ); - HRESULT GetLastPresentCount( - [out] UINT *last_present_count - ); + HRESULT Present( + [in] UINT sync_interval, + [in] UINT flags + ); + HRESULT GetBuffer( + [in] UINT buffer_idx, + [in] REFIID riid, + [in, out] void **surface + ); + HRESULT SetFullscreenState( + [in] BOOL fullscreen, + [in] IDXGIOutput *target + ); + HRESULT GetFullscreenState( + [out] BOOL *fullscreen, + [out] IDXGIOutput **target + ); + HRESULT GetDesc( + [out] DXGI_SWAP_CHAIN_DESC *desc + ); + HRESULT ResizeBuffers( + [in] UINT buffer_count, + [in] UINT width, + [in] UINT height, + [in] DXGI_FORMAT format, + [in] UINT flags + ); + HRESULT ResizeTarget( + [in] const DXGI_MODE_DESC *target_mode_desc + ); + HRESULT GetContainingOutput( + [out] IDXGIOutput **output + ); + HRESULT GetFrameStatistics( + [out] DXGI_FRAME_STATISTICS *stats + ); + HRESULT GetLastPresentCount( + [out] UINT *last_present_count + ); } [ - object, - local, - uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369) + object, + local, + uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369) ] interface IDXGIFactory : IDXGIObject { - HRESULT EnumAdapters( - [in] UINT adapter_idx, - [out] IDXGIAdapter **adapter - ); - HRESULT MakeWindowAssociation( - [in] HWND window, - [in] UINT flags - ); - HRESULT GetWindowAssociation( - [in] HWND *window - ); - HRESULT CreateSwapChain( - [in] IUnknown *device, - [in] DXGI_SWAP_CHAIN_DESC *desc, - [out] IDXGISwapChain **swapchain - ); - HRESULT CreateSoftwareAdapter( - [in] HMODULE swrast, - [out] IDXGIAdapter **adapter - ); + HRESULT EnumAdapters( + [in] UINT adapter_idx, + [out] IDXGIAdapter **adapter + ); + HRESULT MakeWindowAssociation( + [in] HWND window, + [in] UINT flags + ); + HRESULT GetWindowAssociation( + [in] HWND *window + ); + HRESULT CreateSwapChain( + [in] IUnknown *device, + [in] DXGI_SWAP_CHAIN_DESC *desc, + [out] IDXGISwapChain **swapchain + ); + HRESULT CreateSoftwareAdapter( + [in] HMODULE swrast, + [out] IDXGIAdapter **adapter + ); } [local] HRESULT CreateDXGIFactory(REFIID riid, void **factory); [ - object, - local, - uuid(54ec77fa-1377-44e6-8c32-88fd5f44c84c) + object, + local, + uuid(54ec77fa-1377-44e6-8c32-88fd5f44c84c) ] interface IDXGIDevice : IDXGIObject { - HRESULT GetAdapter( - [out] IDXGIAdapter **adapter - ); - HRESULT CreateSurface( - [in] const DXGI_SURFACE_DESC *desc, - [in] UINT surface_count, - [in] DXGI_USAGE usage, - [in] const DXGI_SHARED_RESOURCE *shared_resource, - [out] IDXGISurface **surface - ); - HRESULT QueryResourceResidency( - [in] IUnknown *const *resources, - [out] DXGI_RESIDENCY *residency, - [in] UINT resource_count - ); - HRESULT SetGPUThreadPriority( - [in] INT priority - ); - HRESULT GetGPUThreadPriority( - [out] INT *priority - ); + HRESULT GetAdapter( + [out] IDXGIAdapter **adapter + ); + HRESULT CreateSurface( + [in] const DXGI_SURFACE_DESC *desc, + [in] UINT surface_count, + [in] DXGI_USAGE usage, + [in] const DXGI_SHARED_RESOURCE *shared_resource, + [out] IDXGISurface **surface + ); + HRESULT QueryResourceResidency( + [in] IUnknown *const *resources, + [out] DXGI_RESIDENCY *residency, + [in] UINT resource_count + ); + HRESULT SetGPUThreadPriority( + [in] INT priority + ); + HRESULT GetGPUThreadPriority( + [out] INT *priority + ); } @@ -415,7 +415,7 @@ interface IDXGIResource : IDXGIDeviceSubObject ); HRESULT SetEvictionPriority( - [in] UINT EvictionPriority + [in] UINT EvictionPriority ); HRESULT GetEvictionPriority( @@ -427,11 +427,11 @@ interface IDXGIResource : IDXGIDeviceSubObject interface IDXGISurface1 : IDXGISurface { HRESULT GetDC( - [in] BOOL Discard, + [in] BOOL Discard, [out] HDC *phdc ); - HRESULT ReleaseDC( + HRESULT ReleaseDC( [in, optional] RECT *pDirtyRect ); }; @@ -460,7 +460,7 @@ interface IDXGIAdapter1 : IDXGIAdapter interface IDXGIFactory1 : IDXGIFactory { HRESULT EnumAdapters1( - [in] UINT Adapter, + [in] UINT Adapter, [out] IDXGIAdapter1 **ppAdapter ); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl index 9584407693..31eba08cff 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgitype.idl @@ -8,7 +8,7 @@ * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public @@ -24,61 +24,61 @@ import "ocidl.idl"; import "dxgiformat.idl"; typedef struct DXGI_SAMPLE_DESC { - UINT Count; - UINT Quality; + UINT Count; + UINT Quality; } DXGI_SAMPLE_DESC; typedef enum DXGI_MODE_ROTATION { - DXGI_MODE_ROTATION_UNSPECIFIED = 0, - DXGI_MODE_ROTATION_IDENTITY = 1, - DXGI_MODE_ROTATION_ROTATE90 = 2, - DXGI_MODE_ROTATION_ROTATE180 = 3, - DXGI_MODE_ROTATION_ROTATE270 = 4, + DXGI_MODE_ROTATION_UNSPECIFIED = 0, + DXGI_MODE_ROTATION_IDENTITY = 1, + DXGI_MODE_ROTATION_ROTATE90 = 2, + DXGI_MODE_ROTATION_ROTATE180 = 3, + DXGI_MODE_ROTATION_ROTATE270 = 4, } DXGI_MODE_ROTATION; typedef enum DXGI_MODE_SCANLINE_ORDER { - DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, - DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, - DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, - DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3, + DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, + DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, + DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, + DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3, } DXGI_MODE_SCANLINE_ORDER; typedef enum DXGI_MODE_SCALING { - DXGI_MODE_SCALING_UNSPECIFIED = 0, - DXGI_MODE_SCALING_CENTERED = 1, - DXGI_MODE_SCALING_STRETCHED = 2, + DXGI_MODE_SCALING_UNSPECIFIED = 0, + DXGI_MODE_SCALING_CENTERED = 1, + DXGI_MODE_SCALING_STRETCHED = 2, } DXGI_MODE_SCALING; typedef struct DXGI_RATIONAL { - UINT Numerator; - UINT Denominator; + UINT Numerator; + UINT Denominator; } DXGI_RATIONAL; typedef struct DXGI_MODE_DESC { - UINT Width; - UINT Height; - DXGI_RATIONAL RefreshRate; - DXGI_FORMAT Format; - DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; - DXGI_MODE_SCALING Scaling; + UINT Width; + UINT Height; + DXGI_RATIONAL RefreshRate; + DXGI_FORMAT Format; + DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; + DXGI_MODE_SCALING Scaling; } DXGI_MODE_DESC; typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES { - BOOL ScaleAndOffsetSupported; - float MaxConvertedValue; - float MinConvertedValue; - UINT NumGammaControlPoints; - float ControlPointPositions[1025]; + BOOL ScaleAndOffsetSupported; + float MaxConvertedValue; + float MinConvertedValue; + UINT NumGammaControlPoints; + float ControlPointPositions[1025]; } DXGI_GAMMA_CONTROL_CAPABILITIES; typedef struct DXGI_RGB { - float Red; - float Green; - float Blue; + float Red; + float Green; + float Blue; } DXGI_RGB; typedef struct DXGI_GAMMA_CONTROL { - DXGI_RGB Scale; - DXGI_RGB Offset; - DXGI_RGB GammaCurve[1025]; + DXGI_RGB Scale; + DXGI_RGB Offset; + DXGI_RGB GammaCurve[1025]; } DXGI_GAMMA_CONTROL; diff --git a/src/gallium/state_trackers/d3d1x/docs/coding_style.txt b/src/gallium/state_trackers/d3d1x/docs/coding_style.txt index a644a1323f..fb09417eac 100644 --- a/src/gallium/state_trackers/d3d1x/docs/coding_style.txt +++ b/src/gallium/state_trackers/d3d1x/docs/coding_style.txt @@ -6,7 +6,6 @@ The goal of these guidelines is to allow as much freedom as possible, while keep - Align multiline statements with an additional extra tab before each continuation line - Keep in mind that people can program with proportional fonts: hence, don't attempt to align anything not at the start of the line, since it's impossible - In general, there should never be two consecutive spaces in the source code -- As a special exception, [in] and __in annotations are followed by two spaces to align them with [out] and __out if displayed with a fixed size font. This may be revisited. - There is no strict limit on line length, but try to not make lines too long, and insert a line break where it looks good * Language/platform features diff --git a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_loader.cpp b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_loader.cpp index e5ba309fe4..7b72019458 100644 --- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_loader.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_loader.cpp @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.9 + * Version: 7.9 * * Copyright (C) 2010 LunarG Inc. * @@ -16,14 +16,14 @@ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * Authors: - * Chia-I Wu <olv@lunarg.com> + * Chia-I Wu <olv@lunarg.com> */ #include "dxgi_private.h" @@ -38,153 +38,153 @@ extern "C" static const char * get_search_path(void) { - static const char *search_path; + static const char *search_path; - if (!search_path) { - static char buffer[1024]; - const char *p; - int ret; + if (!search_path) { + static char buffer[1024]; + const char *p; + int ret; - p = getenv("DXGI_DRIVERS_PATH"); - if(!p) - p = getenv("EGL_DRIVERS_PATH"); + p = getenv("DXGI_DRIVERS_PATH"); + if(!p) + p = getenv("EGL_DRIVERS_PATH"); #ifdef __unix__ - if (p && (geteuid() != getuid() || getegid() != getgid())) { - p = NULL; - } + if (p && (geteuid() != getuid() || getegid() != getgid())) { + p = NULL; + } #endif - if (p) { - ret = snprintf(buffer, sizeof(buffer), - "%s:%s", p, DXGI_DRIVER_SEARCH_DIR); - if (ret > 0 && ret < (int)sizeof(buffer)) - search_path = buffer; - } - } - if (!search_path) - search_path = DXGI_DRIVER_SEARCH_DIR; - - return search_path; + if (p) { + ret = snprintf(buffer, sizeof(buffer), + "%s:%s", p, DXGI_DRIVER_SEARCH_DIR); + if (ret > 0 && ret < (int)sizeof(buffer)) + search_path = buffer; + } + } + if (!search_path) + search_path = DXGI_DRIVER_SEARCH_DIR; + + return search_path; } static void for_each_colon_separated(const char *search_path, - bool (*loader)(const char *, size_t, void *), - void *loader_data) + bool (*loader)(const char *, size_t, void *), + void *loader_data) { - const char *cur, *next; - size_t len; + const char *cur, *next; + size_t len; - cur = search_path; - while (cur) { - next = strchr(cur, ':'); - len = (next) ? next - cur : strlen(cur); + cur = search_path; + while (cur) { + next = strchr(cur, ':'); + len = (next) ? next - cur : strlen(cur); - if (!loader(cur, len, loader_data)) - break; + if (!loader(cur, len, loader_data)) + break; - cur = (next) ? next + 1 : NULL; - } + cur = (next) ? next + 1 : NULL; + } } void for_each_in_search_path(bool (*callback)(const char *, size_t, void *), - void *callback_data) + void *callback_data) { - const char *search_path = get_search_path(); - for_each_colon_separated(search_path, callback, callback_data); + const char *search_path = get_search_path(); + for_each_colon_separated(search_path, callback, callback_data); } static struct pipe_module { - boolean initialized; - char *name; - struct util_dl_library *lib; - const struct drm_driver_descriptor *drmdd; - struct pipe_screen *(*swrast_create_screen)(struct sw_winsys *); + boolean initialized; + char *name; + struct util_dl_library *lib; + const struct drm_driver_descriptor *drmdd; + struct pipe_screen *(*swrast_create_screen)(struct sw_winsys *); } pipe_modules[16]; static bool dlopen_pipe_module_cb(const char *dir, size_t len, void *callback_data) { - struct pipe_module *pmod = (struct pipe_module *) callback_data; - char path[1024]; - int ret; - - if (len) { - ret = snprintf(path, sizeof(path), - "%.*s/" PIPE_PREFIX "%s" UTIL_DL_EXT, len, dir, pmod->name); - } - else { - ret = snprintf(path, sizeof(path), - PIPE_PREFIX "%s" UTIL_DL_EXT, pmod->name); - } - if (ret > 0 && ret < (int)sizeof(path)) { - pmod->lib = util_dl_open(path); - } - - return !(pmod->lib); + struct pipe_module *pmod = (struct pipe_module *) callback_data; + char path[1024]; + int ret; + + if (len) { + ret = snprintf(path, sizeof(path), + "%.*s/" PIPE_PREFIX "%s" UTIL_DL_EXT, len, dir, pmod->name); + } + else { + ret = snprintf(path, sizeof(path), + PIPE_PREFIX "%s" UTIL_DL_EXT, pmod->name); + } + if (ret > 0 && ret < (int)sizeof(path)) { + pmod->lib = util_dl_open(path); + } + + return !(pmod->lib); } static bool load_pipe_module(struct pipe_module *pmod, const char *name) { - pmod->name = strdup(name); - if (!pmod->name) - return FALSE; - - for_each_in_search_path(dlopen_pipe_module_cb, (void *) pmod); - if (pmod->lib) { - pmod->drmdd = (const struct drm_driver_descriptor *) - util_dl_get_proc_address(pmod->lib, "driver_descriptor"); - - /* sanity check on the name */ - if (pmod->drmdd && strcmp(pmod->drmdd->name, pmod->name) != 0) - pmod->drmdd = NULL; - - /* swrast */ - if (pmod->drmdd && !pmod->drmdd->driver_name) { - pmod->swrast_create_screen = - (struct pipe_screen *(*)(struct sw_winsys *)) - util_dl_get_proc_address(pmod->lib, "swrast_create_screen"); - if (!pmod->swrast_create_screen) - pmod->drmdd = NULL; - } - - if (!pmod->drmdd) { - util_dl_close(pmod->lib); - pmod->lib = NULL; - } - } - - return (pmod->drmdd != NULL); + pmod->name = strdup(name); + if (!pmod->name) + return FALSE; + + for_each_in_search_path(dlopen_pipe_module_cb, (void *) pmod); + if (pmod->lib) { + pmod->drmdd = (const struct drm_driver_descriptor *) + util_dl_get_proc_address(pmod->lib, "driver_descriptor"); + + /* sanity check on the name */ + if (pmod->drmdd && strcmp(pmod->drmdd->name, pmod->name) != 0) + pmod->drmdd = NULL; + + /* swrast */ + if (pmod->drmdd && !pmod->drmdd->driver_name) { + pmod->swrast_create_screen = + (struct pipe_screen *(*)(struct sw_winsys *)) + util_dl_get_proc_address(pmod->lib, "swrast_create_screen"); + if (!pmod->swrast_create_screen) + pmod->drmdd = NULL; + } + + if (!pmod->drmdd) { + util_dl_close(pmod->lib); + pmod->lib = NULL; + } + } + + return (pmod->drmdd != NULL); } static struct pipe_module * get_pipe_module(const char *name) { - struct pipe_module *pmod = NULL; - unsigned i; - - if (!name) - return NULL; - - for (i = 0; i < sizeof(pipe_modules) / sizeof(pipe_modules[0]); i++) { - if (!pipe_modules[i].initialized || - strcmp(pipe_modules[i].name, name) == 0) { - pmod = &pipe_modules[i]; - break; - } - } - if (!pmod) - return NULL; - - if (!pmod->initialized) { - load_pipe_module(pmod, name); - pmod->initialized = TRUE; - } - - return pmod; + struct pipe_module *pmod = NULL; + unsigned i; + + if (!name) + return NULL; + + for (i = 0; i < sizeof(pipe_modules) / sizeof(pipe_modules[0]); i++) { + if (!pipe_modules[i].initialized || + strcmp(pipe_modules[i].name, name) == 0) { + pmod = &pipe_modules[i]; + break; + } + } + if (!pmod) + return NULL; + + if (!pmod->initialized) { + load_pipe_module(pmod, name); + pmod->initialized = TRUE; + } + + return pmod; } struct native_display; @@ -192,15 +192,15 @@ struct native_display; struct pipe_screen * dxgi_loader_create_drm_screen(struct native_display* dpy, const char *name, int fd) { - struct pipe_module *pmod = get_pipe_module(name); - return (pmod && pmod->drmdd && pmod->drmdd->create_screen) ? - pmod->drmdd->create_screen(fd) : NULL; + struct pipe_module *pmod = get_pipe_module(name); + return (pmod && pmod->drmdd && pmod->drmdd->create_screen) ? + pmod->drmdd->create_screen(fd) : NULL; } struct pipe_screen * dxgi_loader_create_sw_screen(struct native_display* dpy, struct sw_winsys *ws) { - struct pipe_module *pmod = get_pipe_module("swrast"); - return (pmod && pmod->swrast_create_screen) ? - pmod->swrast_create_screen(ws) : NULL; + struct pipe_module *pmod = get_pipe_module("swrast"); + return (pmod && pmod->swrast_create_screen) ? + pmod->swrast_create_screen(ws) : NULL; } 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 2149d83a9c..bf820e9b21 100644 --- a/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgi/src/dxgi_native.cpp @@ -55,12 +55,12 @@ struct GalliumDXGIObject : public GalliumPrivateDataComObject<Base> this->parent = p_parent; } - virtual HRESULT STDMETHODCALLTYPE GetParent( - __in REFIID riid, - __out void **ppParent) - { - return parent->QueryInterface(riid, ppParent); - } + virtual HRESULT STDMETHODCALLTYPE GetParent( + __in REFIID riid, + __out void **ppParent) + { + return parent->QueryInterface(riid, ppParent); + } }; COM_INTERFACE(IGalliumDXGIBackend, IUnknown) @@ -96,7 +96,7 @@ struct GalliumDXGIIdentityBackend : public GalliumComObject<IGalliumDXGIBackend> struct GalliumDXGIFactory : public GalliumDXGIObject<IDXGIFactory1, IUnknown> { - HWND associated_window; + HWND associated_window; const struct native_platform* platform; void* display; ComPtr<IGalliumDXGIBackend> backend; @@ -104,98 +104,98 @@ struct GalliumDXGIFactory : public GalliumDXGIObject<IDXGIFactory1, IUnknown> GalliumDXGIFactory(const struct native_platform* platform, void* display, IGalliumDXGIBackend* p_backend) : GalliumDXGIObject<IDXGIFactory1, IUnknown>((IUnknown*)NULL), platform(platform), display(display) - { + { if(p_backend) backend = p_backend; else backend.reset(new GalliumDXGIIdentityBackend()); } - virtual HRESULT STDMETHODCALLTYPE EnumAdapters( - UINT Adapter, - __out IDXGIAdapter **ppAdapter) + virtual HRESULT STDMETHODCALLTYPE EnumAdapters( + UINT Adapter, + __out IDXGIAdapter **ppAdapter) { return EnumAdapters1(Adapter, (IDXGIAdapter1**)ppAdapter); } - virtual HRESULT STDMETHODCALLTYPE EnumAdapters1( - UINT Adapter, - __out IDXGIAdapter1 **ppAdapter) - { - *ppAdapter = 0; + virtual HRESULT STDMETHODCALLTYPE EnumAdapters1( + UINT Adapter, + __out IDXGIAdapter1 **ppAdapter) + { + *ppAdapter = 0; if(Adapter == 0) { return GalliumDXGIAdapterCreate(this, platform, display, ppAdapter); } #if 0 // TODO: enable this - if(platform == native_get_x11_platform()) - { - unsigned nscreens = ScreenCount((Display*)display); - if(Adapter < nscreens) - { - unsigned def_screen = DefaultScreen(display); - if(Adapter <= def_screen) - --Adapter; - *ppAdapter = GalliumDXGIAdapterCreate(this, platform, display, Adapter); - return S_OK; - } - } + if(platform == native_get_x11_platform()) + { + unsigned nscreens = ScreenCount((Display*)display); + if(Adapter < nscreens) + { + unsigned def_screen = DefaultScreen(display); + if(Adapter <= def_screen) + --Adapter; + *ppAdapter = GalliumDXGIAdapterCreate(this, platform, display, Adapter); + return S_OK; + } + } #endif return DXGI_ERROR_NOT_FOUND; - } - - /* TODO: this is a mysterious underdocumented magic API - * Can we have multiple windows associated? - * Can we have multiple windows associated if we use multiple factories? - * If so, what should GetWindowAssociation return? - * If not, does a new swapchain steal the association? - * Does this act for existing swapchains? For new swapchains? - */ - virtual HRESULT STDMETHODCALLTYPE MakeWindowAssociation( - HWND WindowHandle, - UINT Flags) - { - /* TODO: actually implement, for Wine, X11 and KMS*/ - associated_window = WindowHandle; - return S_OK; - } - - virtual HRESULT STDMETHODCALLTYPE GetWindowAssociation( - __out HWND *pWindowHandle) - { - *pWindowHandle = associated_window; - return S_OK; - } - - virtual HRESULT STDMETHODCALLTYPE CreateSwapChain( - __in IUnknown *pDevice, - __in DXGI_SWAP_CHAIN_DESC *pDesc, - __out IDXGISwapChain **ppSwapChain) - { - return GalliumDXGISwapChainCreate(this, pDevice, *pDesc, ppSwapChain); - } - - virtual HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter( - HMODULE Module, - __out IDXGIAdapter **ppAdapter) - { - /* TODO: ignore the module, and just create a Gallium software screen */ - *ppAdapter = 0; - return E_NOTIMPL; - } - - /* TODO: support hotplug */ - virtual BOOL STDMETHODCALLTYPE IsCurrent( void) - { - return TRUE; - } + } + + /* TODO: this is a mysterious underdocumented magic API + * Can we have multiple windows associated? + * Can we have multiple windows associated if we use multiple factories? + * If so, what should GetWindowAssociation return? + * If not, does a new swapchain steal the association? + * Does this act for existing swapchains? For new swapchains? + */ + virtual HRESULT STDMETHODCALLTYPE MakeWindowAssociation( + HWND WindowHandle, + UINT Flags) + { + /* TODO: actually implement, for Wine, X11 and KMS*/ + associated_window = WindowHandle; + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE GetWindowAssociation( + __out HWND *pWindowHandle) + { + *pWindowHandle = associated_window; + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE CreateSwapChain( + __in IUnknown *pDevice, + __in DXGI_SWAP_CHAIN_DESC *pDesc, + __out IDXGISwapChain **ppSwapChain) + { + return GalliumDXGISwapChainCreate(this, pDevice, *pDesc, ppSwapChain); + } + + virtual HRESULT STDMETHODCALLTYPE CreateSoftwareAdapter( + HMODULE Module, + __out IDXGIAdapter **ppAdapter) + { + /* TODO: ignore the module, and just create a Gallium software screen */ + *ppAdapter = 0; + return E_NOTIMPL; + } + + /* TODO: support hotplug */ + virtual BOOL STDMETHODCALLTYPE IsCurrent( void) + { + return TRUE; + } }; struct GalliumDXGIAdapter : public GalliumMultiComObject< - GalliumDXGIObject<IDXGIAdapter1, GalliumDXGIFactory>, - IGalliumAdapter> + GalliumDXGIObject<IDXGIAdapter1, GalliumDXGIFactory>, + IGalliumAdapter> { struct native_display* display; const struct native_config** configs; @@ -275,62 +275,62 @@ struct GalliumDXGIAdapter free(connectors); } - virtual HRESULT STDMETHODCALLTYPE EnumOutputs( - UINT Output, - __out IDXGIOutput **ppOutput) + virtual HRESULT STDMETHODCALLTYPE EnumOutputs( + UINT Output, + __out IDXGIOutput **ppOutput) { - if(Output >= (unsigned)num_outputs) - return DXGI_ERROR_NOT_FOUND; + if(Output >= (unsigned)num_outputs) + return DXGI_ERROR_NOT_FOUND; - if(connectors) - { - std::ostringstream ss; - ss << "Output #" << Output; + if(connectors) + { + std::ostringstream ss; + ss << "Output #" << Output; return GalliumDXGIOutputCreate(this, ss.str(), connectors[Output], ppOutput); - } - else - return GalliumDXGIOutputCreate(this, "Unique output", NULL, ppOutput); + } + else + return GalliumDXGIOutputCreate(this, "Unique output", NULL, ppOutput); + } + + virtual HRESULT STDMETHODCALLTYPE GetDesc( + __out DXGI_ADAPTER_DESC *pDesc) + { + memcpy(pDesc, &desc, sizeof(*pDesc)); + return S_OK; } - virtual HRESULT STDMETHODCALLTYPE GetDesc( - __out DXGI_ADAPTER_DESC *pDesc) - { - memcpy(pDesc, &desc, sizeof(*pDesc)); - return S_OK; - } - - virtual HRESULT STDMETHODCALLTYPE GetDesc1( - __out DXGI_ADAPTER_DESC1 *pDesc) - { - memcpy(pDesc, &desc, sizeof(*pDesc)); - return S_OK; - } - - virtual HRESULT STDMETHODCALLTYPE CheckInterfaceSupport( - __in REFGUID InterfaceName, - __out LARGE_INTEGER *pUMDVersion) - { - // these number was taken from Windows 7 with Catalyst 10.8: its meaning is unclear - if(InterfaceName == IID_ID3D11Device || InterfaceName == IID_ID3D10Device1 || InterfaceName == IID_ID3D10Device) - { - pUMDVersion->QuadPart = 0x00080011000a0411ULL; - return S_OK; - } - return DXGI_ERROR_UNSUPPORTED; - } - - pipe_screen* STDMETHODCALLTYPE GetGalliumScreen() - { - return display->screen; - } - - pipe_screen* STDMETHODCALLTYPE GetGalliumReferenceSoftwareScreen() - { - // TODO: give a softpipe screen - return display->screen; - } - - pipe_screen* STDMETHODCALLTYPE GetGalliumFastSoftwareScreen() + virtual HRESULT STDMETHODCALLTYPE GetDesc1( + __out DXGI_ADAPTER_DESC1 *pDesc) + { + memcpy(pDesc, &desc, sizeof(*pDesc)); + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE CheckInterfaceSupport( + __in REFGUID InterfaceName, + __out LARGE_INTEGER *pUMDVersion) + { + // these number was taken from Windows 7 with Catalyst 10.8: its meaning is unclear + if(InterfaceName == IID_ID3D11Device || InterfaceName == IID_ID3D10Device1 || InterfaceName == IID_ID3D10Device) + { + pUMDVersion->QuadPart = 0x00080011000a0411ULL; + return S_OK; + } + return DXGI_ERROR_UNSUPPORTED; + } + + pipe_screen* STDMETHODCALLTYPE GetGalliumScreen() + { + return display->screen; + } + + pipe_screen* STDMETHODCALLTYPE GetGalliumReferenceSoftwareScreen() + { + // TODO: give a softpipe screen + return display->screen; + } + + pipe_screen* STDMETHODCALLTYPE GetGalliumFastSoftwareScreen() { // TODO: give an llvmpipe screen return display->screen; @@ -407,7 +407,7 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE GetDesc( - __out DXGI_OUTPUT_DESC *pDesc) + __out DXGI_OUTPUT_DESC *pDesc) { *pDesc = desc; return S_OK; @@ -416,8 +416,8 @@ use_fake_mode: virtual HRESULT STDMETHODCALLTYPE GetDisplayModeList( DXGI_FORMAT EnumFormat, UINT Flags, - __inout UINT *pNumModes, - __out_ecount_part_opt(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc) + __inout UINT *pNumModes, + __out_ecount_part_opt(*pNumModes,*pNumModes) DXGI_MODE_DESC *pDesc) { /* TODO: should we return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE when we don't * support modesetting instead of fake modes? @@ -452,9 +452,9 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE FindClosestMatchingMode( - __in const DXGI_MODE_DESC *pModeToMatch, - __out DXGI_MODE_DESC *pClosestMatch, - __in_opt IUnknown *pConcernedDevice) + __in const DXGI_MODE_DESC *pModeToMatch, + __out DXGI_MODE_DESC *pClosestMatch, + __in_opt IUnknown *pConcernedDevice) { /* TODO: actually implement this */ DXGI_FORMAT dxgi_format = pModeToMatch->Format; @@ -482,7 +482,7 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE TakeOwnership( - __in IUnknown *pDevice, + __in IUnknown *pDevice, BOOL Exclusive) { return S_OK; @@ -493,14 +493,14 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities( - __out DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) + __out DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) { memset(pGammaCaps, 0, sizeof(*pGammaCaps)); return S_OK; } virtual HRESULT STDMETHODCALLTYPE SetGammaControl( - __in const DXGI_GAMMA_CONTROL *pArray) + __in const DXGI_GAMMA_CONTROL *pArray) { if(!gamma) gamma = new DXGI_GAMMA_CONTROL; @@ -509,7 +509,7 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE GetGammaControl( - __out DXGI_GAMMA_CONTROL *pArray) + __out DXGI_GAMMA_CONTROL *pArray) { if(gamma) *pArray = *gamma; @@ -528,19 +528,19 @@ use_fake_mode: } virtual HRESULT STDMETHODCALLTYPE SetDisplaySurface( - __in IDXGISurface *pScanoutSurface) + __in IDXGISurface *pScanoutSurface) { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData( - __in IDXGISurface *pDestination) + __in IDXGISurface *pDestination) { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics( - __out DXGI_FRAME_STATISTICS *pStats) + __out DXGI_FRAME_STATISTICS *pStats) { memset(pStats, 0, sizeof(*pStats)); #ifdef _WIN32 @@ -579,7 +579,7 @@ use_fake_mode: * GetBuffer(n) with n > 0 points to resources that are identical to buffer 0, but * are classified as "read-only resources" (due to DXGI_USAGE_READ_ONLY), * meaning that you can't create render target views on them, or use them as - * a CopyResource/CopySubresourceRegion destination. + * a CopyResource/CopySubresourceRegion destination. * It appears the only valid operation is to use them as a source for CopyResource * and CopySubresourceRegion as well as just waiting for them to become * buffer 0 again. @@ -620,17 +620,17 @@ use_fake_mode: * * There are three strategies: * 1. Use a single buffer, and always copy it to a window system provided buffer, or - * just give the buffer to the window system if it supports that + * just give the buffer to the window system if it supports that * 2. Rotate the buffers in the D3D1x implementation, and recreate and rebind the views. - * Don't support driver-provided command lists + * Don't support driver-provided command lists * 3. Add this rotation functionality to the Gallium driver, with the idea that it would rotate - * remap GPU virtual memory, so that virtual address are unchanged, but the physical - * ones are rotated (so that pushbuffers remain valid). - * If the driver does not support this, either fall back to (1), or have a layer doing this, - * putting a deferred context layer over this intermediate layer. + * remap GPU virtual memory, so that virtual address are unchanged, but the physical + * ones are rotated (so that pushbuffers remain valid). + * If the driver does not support this, either fall back to (1), or have a layer doing this, + * putting a deferred context layer over this intermediate layer. * * (2) is not acceptable since it prevents an optimal implementation. - * (3) is the ideal solution, but it is complicated. + * (3) is the ideal solution, but it is complicated. * * Hence, we implement (1) for now, and will switch to (3) later. * @@ -872,7 +872,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX if(desc.SwapEffect == DXGI_SWAP_EFFECT_SEQUENTIAL && desc.BufferCount != 1) { - std::cerr << "Gallium DXGI: if DXGI_SWAP_EFFECT_SEQUENTIAL is specified, only BufferCount == 1 is implemented, but " << desc.BufferCount << " was specified: ignoring this" << std::endl; + std::cerr << "Gallium DXGI: if DXGI_SWAP_EFFECT_SEQUENTIAL is specified, only BufferCount == 1 is implemented, but " << desc.BufferCount << " was specified: ignoring this" << std::endl; // change the returned desc, so that the application might perhaps notice what we did and react well desc.BufferCount = 1; } @@ -940,16 +940,16 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX pipe->destroy(pipe); } - virtual HRESULT STDMETHODCALLTYPE GetDevice( - __in REFIID riid, - __out void **ppDevice) - { - return dxgi_device->QueryInterface(riid, ppDevice); - } + virtual HRESULT STDMETHODCALLTYPE GetDevice( + __in REFIID riid, + __out void **ppDevice) + { + return dxgi_device->QueryInterface(riid, ppDevice); + } - HRESULT create_buffer0() - { - HRESULT hr; + HRESULT create_buffer0() + { + HRESULT hr; ComPtr<IDXGISurface> new_buffer0; DXGI_USAGE usage = DXGI_USAGE_BACK_BUFFER | DXGI_USAGE_RENDER_TARGET_OUTPUT; if(desc.SwapEffect == DXGI_SWAP_EFFECT_DISCARD) @@ -987,7 +987,7 @@ struct GalliumDXGISwapChain : public GalliumDXGIObject<IDXGISwapChain, GalliumDX templat.format = gallium_buffer0->format; gallium_buffer0_view = pipe->create_sampler_view(pipe, gallium_buffer0, &templat); return S_OK; - } + } bool validate() { @@ -1158,9 +1158,9 @@ end_present: } virtual HRESULT STDMETHODCALLTYPE GetBuffer( - UINT Buffer, - __in REFIID riid, - __out void **ppSurface) + UINT Buffer, + __in REFIID riid, + __out void **ppSurface) { if(Buffer > 0) { @@ -1182,7 +1182,7 @@ end_present: /* TODO: implement somehow */ virtual HRESULT STDMETHODCALLTYPE SetFullscreenState( BOOL Fullscreen, - __in_opt IDXGIOutput *pTarget) + __in_opt IDXGIOutput *pTarget) { fullscreen = Fullscreen; target = pTarget; @@ -1190,8 +1190,8 @@ end_present: } virtual HRESULT STDMETHODCALLTYPE GetFullscreenState( - __out BOOL *pFullscreen, - __out IDXGIOutput **ppTarget) + __out BOOL *pFullscreen, + __out IDXGIOutput **ppTarget) { if(pFullscreen) *pFullscreen = fullscreen; @@ -1201,7 +1201,7 @@ end_present: } virtual HRESULT STDMETHODCALLTYPE GetDesc( - __out DXGI_SWAP_CHAIN_DESC *pDesc) + __out DXGI_SWAP_CHAIN_DESC *pDesc) { *pDesc = desc; return S_OK; @@ -1243,14 +1243,14 @@ end_present: } virtual HRESULT STDMETHODCALLTYPE GetContainingOutput( - __out IDXGIOutput **ppOutput) + __out IDXGIOutput **ppOutput) { *ppOutput = adapter->outputs[0].ref(); return S_OK; } virtual HRESULT STDMETHODCALLTYPE GetFrameStatistics( - __out DXGI_FRAME_STATISTICS *pStats) + __out DXGI_FRAME_STATISTICS *pStats) { memset(pStats, 0, sizeof(*pStats)); #ifdef _WIN32 @@ -1263,7 +1263,7 @@ end_present: } virtual HRESULT STDMETHODCALLTYPE GetLastPresentCount( - __out UINT *pLastPresentCount) + __out UINT *pLastPresentCount) { *pLastPresentCount = present_count; return S_OK; @@ -1389,11 +1389,11 @@ void STDMETHODCALLTYPE GalliumDXGIMakeDefault() } /* TODO: why did Microsoft add this? should we do something different for DXGI 1.0 and 1.1? - * Or perhaps what they actually mean is "only create a single factory in your application"? - * TODO: should we use a singleton here, so we never have multiple DXGI objects for the same thing? */ - HRESULT STDMETHODCALLTYPE CreateDXGIFactory1( - __in REFIID riid, - __out void **ppFactory + * Or perhaps what they actually mean is "only create a single factory in your application"? + * TODO: should we use a singleton here, so we never have multiple DXGI objects for the same thing? */ + HRESULT STDMETHODCALLTYPE CreateDXGIFactory1( + __in REFIID riid, + __out void **ppFactory ) { GalliumDXGIFactory* factory; @@ -1409,9 +1409,9 @@ void STDMETHODCALLTYPE GalliumDXGIMakeDefault() return hres; } - HRESULT STDMETHODCALLTYPE CreateDXGIFactory( - __in REFIID riid, - __out void **ppFactory + HRESULT STDMETHODCALLTYPE CreateDXGIFactory( + __in REFIID riid, + __out void **ppFactory ) { return CreateDXGIFactory1(riid, ppFactory); diff --git a/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp b/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp index dd00226134..3ab8cda191 100644 --- a/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp @@ -30,13 +30,13 @@ #include <pipe/p_screen.h> #include <pipe/p_context.h> -HRESULT D3D10CreateDevice1( +HRESULT D3D10CreateDevice1( __in_opt IDXGIAdapter *pAdapter, - __in D3D10_DRIVER_TYPE DriverType, - __in HMODULE Software, - __in unsigned Flags, - __in D3D10_FEATURE_LEVEL1 HardwareLevel, - __in unsigned SDKVersion, + __in D3D10_DRIVER_TYPE DriverType, + __in HMODULE Software, + __in unsigned Flags, + __in D3D10_FEATURE_LEVEL1 HardwareLevel, + __in unsigned SDKVersion, __out_opt ID3D10Device1 **ppDevice ) { @@ -87,7 +87,7 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1( D3D10_DRIVER_TYPE DriverType, HMODULE Software, unsigned Flags, - __in D3D10_FEATURE_LEVEL1 HardwareLevel, + __in D3D10_FEATURE_LEVEL1 HardwareLevel, unsigned SDKVersion, __in_opt DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, __out_opt IDXGISwapChain** ppSwapChain, @@ -122,12 +122,12 @@ HRESULT WINAPI D3D10CreateDeviceAndSwapChain1( return hr; } -HRESULT D3D10CreateDevice( +HRESULT D3D10CreateDevice( __in_opt IDXGIAdapter *pAdapter, - __in D3D10_DRIVER_TYPE DriverType, - __in HMODULE Software, - __in unsigned Flags, - __in unsigned SDKVersion, + __in D3D10_DRIVER_TYPE DriverType, + __in HMODULE Software, + __in unsigned Flags, + __in unsigned SDKVersion, __out_opt ID3D10Device **ppDevice ) { diff --git a/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp b/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp index 86bb24baef..66f69bb730 100644 --- a/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp @@ -30,17 +30,17 @@ #include <pipe/p_screen.h> #include <pipe/p_context.h> -HRESULT D3D11CreateDevice( - __in_opt IDXGIAdapter *pAdapter, - __in D3D_DRIVER_TYPE DriverType, - __in HMODULE Software, - __in unsigned Flags, - __in_ecount_opt( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, - __in unsigned FeatureLevels, - __in unsigned SDKVersion, - __out_opt ID3D11Device **ppDevice, - __out_opt D3D_FEATURE_LEVEL *pFeatureLevel, - __out_opt ID3D11DeviceContext **ppImmediateContext +HRESULT D3D11CreateDevice( + __in_opt IDXGIAdapter *pAdapter, + __in D3D_DRIVER_TYPE DriverType, + __in HMODULE Software, + __in unsigned Flags, + __in_ecount_opt( FeatureLevels ) const D3D_FEATURE_LEVEL *pFeatureLevels, + __in unsigned FeatureLevels, + __in unsigned SDKVersion, + __out_opt ID3D11Device **ppDevice, + __out_opt D3D_FEATURE_LEVEL *pFeatureLevel, + __out_opt ID3D11DeviceContext **ppImmediateContext ) { HRESULT hr; diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp index 46a3905d8f..3d3990a63e 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp @@ -168,23 +168,23 @@ struct GalliumD3D11Screen : public GalliumD3D11ScreenBase #if API < 11 // we use a D3D11-like API internally virtual HRESULT STDMETHODCALLTYPE Map( - __in ID3D11Resource *pResource, - __in unsigned Subresource, - __in D3D11_MAP MapType, - __in unsigned MapFlags, - __out D3D11_MAPPED_SUBRESOURCE *pMappedResource) = 0; + __in ID3D11Resource *pResource, + __in unsigned Subresource, + __in D3D11_MAP MapType, + __in unsigned MapFlags, + __out D3D11_MAPPED_SUBRESOURCE *pMappedResource) = 0; virtual void STDMETHODCALLTYPE Unmap( - __in ID3D11Resource *pResource, - __in unsigned Subresource) = 0; + __in ID3D11Resource *pResource, + __in unsigned Subresource) = 0; virtual void STDMETHODCALLTYPE Begin( - __in ID3D11Asynchronous *pAsync) = 0; + __in ID3D11Asynchronous *pAsync) = 0; virtual void STDMETHODCALLTYPE End( - __in ID3D11Asynchronous *pAsync) = 0; + __in ID3D11Asynchronous *pAsync) = 0; virtual HRESULT STDMETHODCALLTYPE GetData( - __in ID3D11Asynchronous *pAsync, - __out_bcount_opt(DataSize) void *pData, - __in unsigned DataSize, - __in unsigned GetDataFlags) = 0; + __in ID3D11Asynchronous *pAsync, + __out_bcount_opt(DataSize) void *pData, + __in unsigned DataSize, + __in unsigned GetDataFlags) = 0; // TODO: maybe we should use function overloading, but that might risk silent errors, // and cannot be exported to a C interface diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h index 3c789d3af0..04d5b86496 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_context.h @@ -303,11 +303,11 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } #if API >= 11 #define SET_SHADER_EXTRA_ARGS , \ - __in_ecount_opt(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, \ + __in_ecount_opt(NumClassInstances) ID3D11ClassInstance *const *ppClassInstances, \ unsigned NumClassInstances #define GET_SHADER_EXTRA_ARGS , \ - __out_ecount_opt(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, \ - __inout_opt unsigned *pNumClassInstances + __out_ecount_opt(*pNumClassInstances) ID3D11ClassInstance **ppClassInstances, \ + __inout_opt unsigned *pNumClassInstances #else #define SET_SHADER_EXTRA_ARGS #define GET_SHADER_EXTRA_ARGS @@ -396,65 +396,65 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> #define IMPLEMENT_SHADER_STAGE(XS, Stage) \ virtual void STDMETHODCALLTYPE XS##SetShader( \ - __in_opt ID3D11##Stage##Shader *pShader \ + __in_opt ID3D11##Stage##Shader *pShader \ SET_SHADER_EXTRA_ARGS) \ { \ SYNCHRONIZED; \ xs_set_shader<D3D11_STAGE_##XS>((GalliumD3D11Shader<>*)pShader); \ } \ virtual void STDMETHODCALLTYPE XS##GetShader(\ - __out ID3D11##Stage##Shader **ppShader \ + __out ID3D11##Stage##Shader **ppShader \ GET_SHADER_EXTRA_ARGS) \ { \ SYNCHRONIZED; \ *ppShader = (ID3D11##Stage##Shader*)shaders[D3D11_STAGE_##XS].ref(); \ } \ virtual void STDMETHODCALLTYPE XS##SetConstantBuffers(\ - __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot) unsigned NumBuffers, \ - __in_ecount(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) \ + __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot) unsigned NumBuffers, \ + __in_ecount(NumBuffers) ID3D11Buffer *const *ppConstantBuffers) \ { \ SYNCHRONIZED; \ xs_set_constant_buffers<D3D11_STAGE_##XS>(StartSlot, NumBuffers, (GalliumD3D11Buffer *const *)ppConstantBuffers); \ } \ virtual void STDMETHODCALLTYPE XS##GetConstantBuffers(\ - __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot) unsigned NumBuffers, \ - __out_ecount(NumBuffers) ID3D11Buffer **ppConstantBuffers) \ + __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT - StartSlot) unsigned NumBuffers, \ + __out_ecount(NumBuffers) ID3D11Buffer **ppConstantBuffers) \ { \ SYNCHRONIZED; \ for(unsigned i = 0; i < NumBuffers; ++i) \ ppConstantBuffers[i] = constant_buffers[D3D11_STAGE_##XS][StartSlot + i].ref(); \ } \ virtual void STDMETHODCALLTYPE XS##SetShaderResources(\ - __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumViews, \ - __in_ecount(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) \ + __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumViews, \ + __in_ecount(NumViews) ID3D11ShaderResourceView *const *ppShaderResourceViews) \ { \ SYNCHRONIZED; \ xs_set_shader_resources<D3D11_STAGE_##XS>(StartSlot, NumViews, (GalliumD3D11ShaderResourceView *const *)ppShaderResourceViews); \ } \ virtual void STDMETHODCALLTYPE XS##GetShaderResources(\ - __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumViews, \ - __out_ecount(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) \ + __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumViews, \ + __out_ecount(NumViews) ID3D11ShaderResourceView **ppShaderResourceViews) \ { \ SYNCHRONIZED; \ for(unsigned i = 0; i < NumViews; ++i) \ ppShaderResourceViews[i] = shader_resource_views[D3D11_STAGE_##XS][StartSlot + i].ref(); \ } \ virtual void STDMETHODCALLTYPE XS##SetSamplers(\ - __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot) unsigned NumSamplers, \ - __in_ecount(NumSamplers) ID3D11SamplerState *const *ppSamplers) \ + __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot) unsigned NumSamplers, \ + __in_ecount(NumSamplers) ID3D11SamplerState *const *ppSamplers) \ { \ SYNCHRONIZED; \ xs_set_samplers<D3D11_STAGE_##XS>(StartSlot, NumSamplers, (GalliumD3D11SamplerState *const *)ppSamplers); \ } \ virtual void STDMETHODCALLTYPE XS##GetSamplers( \ - __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1) unsigned StartSlot, \ - __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot) unsigned NumSamplers, \ - __out_ecount(NumSamplers) ID3D11SamplerState **ppSamplers) \ + __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - 1) unsigned StartSlot, \ + __in_range(0, D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT - StartSlot) unsigned NumSamplers, \ + __out_ecount(NumSamplers) ID3D11SamplerState **ppSamplers) \ { \ SYNCHRONIZED; \ for(unsigned i = 0; i < NumSamplers; ++i) \ @@ -477,10 +477,10 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> IMPLEMENT_SHADER_STAGE(CS, Compute) virtual void STDMETHODCALLTYPE CSSetUnorderedAccessViews( - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned StartSlot, - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - StartSlot) unsigned NumUAVs, - __in_ecount(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, - __in_ecount(NumUAVs) const unsigned *pUAVInitialCounts) + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned StartSlot, + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - StartSlot) unsigned NumUAVs, + __in_ecount(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + __in_ecount(NumUAVs) const unsigned *pUAVInitialCounts) { SYNCHRONIZED; for(unsigned i = 0; i < NumUAVs; ++i) @@ -488,9 +488,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE CSGetUnorderedAccessViews( - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned StartSlot, - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - StartSlot) unsigned NumUAVs, - __out_ecount(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned StartSlot, + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - StartSlot) unsigned NumUAVs, + __out_ecount(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) { SYNCHRONIZED; for(unsigned i = 0; i < NumUAVs; ++i) @@ -535,7 +535,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> if(s < caps.stages) { void* samplers_to_bind[PIPE_MAX_SAMPLERS]; - unsigned num_samplers_to_bind = shaders[s] ? shaders[s]->slot_to_sampler.size() : 0; + unsigned num_samplers_to_bind = shaders[s] ? shaders[s]->slot_to_sampler.size() : 0; for(unsigned i = 0; i < num_samplers_to_bind; ++i) { // index can be -1 to access sampler_csos[s].ld @@ -579,7 +579,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IASetInputLayout( - __in_opt ID3D11InputLayout *pInputLayout) + __in_opt ID3D11InputLayout *pInputLayout) { SYNCHRONIZED; if(pInputLayout != input_layout.p) @@ -590,18 +590,18 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IAGetInputLayout( - __out ID3D11InputLayout **ppInputLayout) + __out ID3D11InputLayout **ppInputLayout) { SYNCHRONIZED; *ppInputLayout = input_layout.ref(); } virtual void STDMETHODCALLTYPE IASetVertexBuffers( - __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, - __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumBuffers, - __in_ecount(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, - __in_ecount(NumBuffers) const unsigned *pStrides, - __in_ecount(NumBuffers) const unsigned *pOffsets) + __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, + __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumBuffers, + __in_ecount(NumBuffers) ID3D11Buffer *const *ppVertexBuffers, + __in_ecount(NumBuffers) const unsigned *pStrides, + __in_ecount(NumBuffers) const unsigned *pOffsets) { SYNCHRONIZED; int last_different = -1; @@ -629,11 +629,11 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IAGetVertexBuffers( - __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, - __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumBuffers, - __out_ecount_opt(NumBuffers) ID3D11Buffer **ppVertexBuffers, - __out_ecount_opt(NumBuffers) unsigned *pStrides, - __out_ecount_opt(NumBuffers) unsigned *pOffsets) + __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - 1) unsigned StartSlot, + __in_range(0, D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT - StartSlot) unsigned NumBuffers, + __out_ecount_opt(NumBuffers) ID3D11Buffer **ppVertexBuffers, + __out_ecount_opt(NumBuffers) unsigned *pStrides, + __out_ecount_opt(NumBuffers) unsigned *pOffsets) { SYNCHRONIZED; if(ppVertexBuffers) @@ -677,9 +677,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IASetIndexBuffer( - __in_opt ID3D11Buffer *pIndexBuffer, - __in DXGI_FORMAT Format, - __in unsigned Offset) + __in_opt ID3D11Buffer *pIndexBuffer, + __in DXGI_FORMAT Format, + __in unsigned Offset) { SYNCHRONIZED; if(index_buffer.p != pIndexBuffer || index_format != Format || index_offset != Offset) @@ -693,9 +693,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IAGetIndexBuffer( - __out_opt ID3D11Buffer **pIndexBuffer, - __out_opt DXGI_FORMAT *Format, - __out_opt unsigned *Offset) + __out_opt ID3D11Buffer **pIndexBuffer, + __out_opt DXGI_FORMAT *Format, + __out_opt unsigned *Offset) { SYNCHRONIZED; if(pIndexBuffer) @@ -707,7 +707,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IASetPrimitiveTopology( - __in D3D11_PRIMITIVE_TOPOLOGY Topology) + __in D3D11_PRIMITIVE_TOPOLOGY Topology) { SYNCHRONIZED; if(primitive_topology != Topology) @@ -721,16 +721,16 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE IAGetPrimitiveTopology( - __out D3D11_PRIMITIVE_TOPOLOGY *pTopology) + __out D3D11_PRIMITIVE_TOPOLOGY *pTopology) { SYNCHRONIZED; *pTopology = primitive_topology; } virtual void STDMETHODCALLTYPE DrawIndexed( - __in unsigned IndexCount, - __in unsigned StartIndexLocation, - __in int BaseVertexLocation) + __in unsigned IndexCount, + __in unsigned StartIndexLocation, + __in int BaseVertexLocation) { SYNCHRONIZED; if(update_flags) @@ -751,8 +751,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE Draw( - __in unsigned VertexCount, - __in unsigned StartVertexLocation) + __in unsigned VertexCount, + __in unsigned StartVertexLocation) { SYNCHRONIZED; if(update_flags) @@ -773,11 +773,11 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE DrawIndexedInstanced( - __in unsigned IndexCountPerInstance, - __in unsigned InstanceCount, - __in unsigned StartIndexLocation, - __in int BaseVertexLocation, - __in unsigned StartInstanceLocation) + __in unsigned IndexCountPerInstance, + __in unsigned InstanceCount, + __in unsigned StartIndexLocation, + __in int BaseVertexLocation, + __in unsigned StartInstanceLocation) { SYNCHRONIZED; if(update_flags) @@ -798,10 +798,10 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE DrawInstanced( - __in unsigned VertexCountPerInstance, - __in unsigned InstanceCount, - __in unsigned StartVertexLocation, - __in unsigned StartInstanceLocation) + __in unsigned VertexCountPerInstance, + __in unsigned InstanceCount, + __in unsigned StartVertexLocation, + __in unsigned StartInstanceLocation) { SYNCHRONIZED; if(update_flags) @@ -834,8 +834,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE DrawIndexedInstancedIndirect( - __in ID3D11Buffer *pBufferForArgs, - __in unsigned AlignedByteOffsetForArgs) + __in ID3D11Buffer *pBufferForArgs, + __in unsigned AlignedByteOffsetForArgs) { SYNCHRONIZED; if(update_flags) @@ -865,8 +865,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE DrawInstancedIndirect( - __in ID3D11Buffer *pBufferForArgs, - __in unsigned AlignedByteOffsetForArgs) + __in ID3D11Buffer *pBufferForArgs, + __in unsigned AlignedByteOffsetForArgs) { SYNCHRONIZED; if(update_flags) @@ -896,9 +896,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> #if API >= 11 virtual void STDMETHODCALLTYPE Dispatch( - __in unsigned ThreadGroupCountX, - __in unsigned ThreadGroupCountY, - __in unsigned ThreadGroupCountZ) + __in unsigned ThreadGroupCountX, + __in unsigned ThreadGroupCountY, + __in unsigned ThreadGroupCountZ) { // uncomment this when this is implemented // SYNCHRONIZED; @@ -907,8 +907,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE DispatchIndirect( - __in ID3D11Buffer *pBufferForArgs, - __in unsigned AlignedByteOffsetForArgs) + __in ID3D11Buffer *pBufferForArgs, + __in unsigned AlignedByteOffsetForArgs) { // uncomment this when this is implemented // SYNCHRONIZED; @@ -926,7 +926,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSSetState( - __in_opt ID3D11RasterizerState *pRasterizerState) + __in_opt ID3D11RasterizerState *pRasterizerState) { SYNCHRONIZED; if(pRasterizerState != rasterizer_state.p) @@ -943,7 +943,7 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSGetState( - __out ID3D11RasterizerState **ppRasterizerState) + __out ID3D11RasterizerState **ppRasterizerState) { SYNCHRONIZED; *ppRasterizerState = rasterizer_state.ref(); @@ -968,8 +968,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSSetViewports( - __in_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned NumViewports, - __in_ecount_opt(NumViewports) const D3D11_VIEWPORT *pViewports) + __in_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned NumViewports, + __in_ecount_opt(NumViewports) const D3D11_VIEWPORT *pViewports) { SYNCHRONIZED; if(NumViewports) @@ -992,8 +992,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSGetViewports( - __inout_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned *pNumViewports, - __out_ecount_opt(*pNumViewports) D3D11_VIEWPORT *pViewports) + __inout_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned *pNumViewports, + __out_ecount_opt(*pNumViewports) D3D11_VIEWPORT *pViewports) { SYNCHRONIZED; if(pViewports) @@ -1019,8 +1019,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSSetScissorRects( - __in_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned NumRects, - __in_ecount_opt(NumRects) const D3D11_RECT *pRects) + __in_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned NumRects, + __in_ecount_opt(NumRects) const D3D11_RECT *pRects) { SYNCHRONIZED; if(NumRects) @@ -1044,8 +1044,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE RSGetScissorRects( - __inout_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned *pNumRects, - __out_ecount_opt(*pNumRects) D3D11_RECT *pRects) + __inout_range(0, D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE) unsigned *pNumRects, + __out_ecount_opt(*pNumRects) D3D11_RECT *pRects) { SYNCHRONIZED; if(pRects) @@ -1061,9 +1061,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE OMSetBlendState( - __in_opt ID3D11BlendState *pBlendState, - __in_opt const float BlendFactor[ 4 ], - __in unsigned SampleMask) + __in_opt ID3D11BlendState *pBlendState, + __in_opt const float BlendFactor[ 4 ], + __in unsigned SampleMask) { SYNCHRONIZED; float white[4] = {1.0f, 1.0f, 1.0f, 1.0f}; @@ -1092,9 +1092,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE OMGetBlendState( - __out_opt ID3D11BlendState **ppBlendState, - __out_opt float BlendFactor[ 4 ], - __out_opt unsigned *pSampleMask) + __out_opt ID3D11BlendState **ppBlendState, + __out_opt float BlendFactor[ 4 ], + __out_opt unsigned *pSampleMask) { SYNCHRONIZED; if(ppBlendState) @@ -1114,8 +1114,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE OMSetDepthStencilState( - __in_opt ID3D11DepthStencilState *pDepthStencilState, - __in unsigned StencilRef) + __in_opt ID3D11DepthStencilState *pDepthStencilState, + __in unsigned StencilRef) { SYNCHRONIZED; if(pDepthStencilState != depth_stencil_state.p) @@ -1132,8 +1132,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> } virtual void STDMETHODCALLTYPE OMGetDepthStencilState( - __out_opt ID3D11DepthStencilState **ppDepthStencilState, - __out_opt unsigned *pStencilRef) + __out_opt ID3D11DepthStencilState **ppDepthStencilState, + __out_opt unsigned *pStencilRef) { SYNCHRONIZED; if(*ppDepthStencilState) @@ -1178,9 +1178,9 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl<threadsafe> */ virtual void STDMETHODCALLTYPE OMSetRenderTargets( - __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumViews, - __in_ecount_opt(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, - __in_opt ID3D11DepthStencilView *pDepthStencilView) + __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumViews, + __in_ecount_opt(NumViews) ID3D11RenderTargetView *const *ppRenderTargetViews, + __in_opt ID3D11DepthStencilView *pDepthStencilView) { SYNCHRONIZED; if(!ppRenderTargetViews) @@ -1211,9 +1211,9 @@ changed: } virtual void STDMETHODCALLTYPE OMGetRenderTargets( - __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumViews, - __out_ecount_opt(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, - __out_opt ID3D11DepthStencilView **ppDepthStencilView) + __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumViews, + __out_ecount_opt(NumViews) ID3D11RenderTargetView **ppRenderTargetViews, + __out_opt ID3D11DepthStencilView **ppDepthStencilView) { SYNCHRONIZED; if(ppRenderTargetViews) @@ -1233,13 +1233,13 @@ changed: #if API >= 11 /* TODO: what is this supposed to do _exactly_? are we doing the right thing? */ virtual void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews( - __in unsigned NumRTVs, - __in_ecount_opt(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, - __in_opt ID3D11DepthStencilView *pDepthStencilView, - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned UAVStartSlot, - __in unsigned NumUAVs, - __in_ecount_opt(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, - __in_ecount_opt(NumUAVs) const unsigned *pUAVInitialCounts) + __in unsigned NumRTVs, + __in_ecount_opt(NumRTVs) ID3D11RenderTargetView *const *ppRenderTargetViews, + __in_opt ID3D11DepthStencilView *pDepthStencilView, + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned UAVStartSlot, + __in unsigned NumUAVs, + __in_ecount_opt(NumUAVs) ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, + __in_ecount_opt(NumUAVs) const unsigned *pUAVInitialCounts) { SYNCHRONIZED; if(NumRTVs != D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL) @@ -1256,12 +1256,12 @@ changed: } virtual void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews( - __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumRTVs, - __out_ecount_opt(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, - __out_opt ID3D11DepthStencilView **ppDepthStencilView, - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned UAVStartSlot, - __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot) unsigned NumUAVs, - __out_ecount_opt(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) + __in_range(0, D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT) unsigned NumRTVs, + __out_ecount_opt(NumRTVs) ID3D11RenderTargetView **ppRenderTargetViews, + __out_opt ID3D11DepthStencilView **ppDepthStencilView, + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - 1) unsigned UAVStartSlot, + __in_range(0, D3D11_PS_CS_UAV_REGISTER_COUNT - UAVStartSlot) unsigned NumUAVs, + __out_ecount_opt(NumUAVs) ID3D11UnorderedAccessView **ppUnorderedAccessViews) { SYNCHRONIZED; if(ppRenderTargetViews) @@ -1276,9 +1276,9 @@ changed: #endif virtual void STDMETHODCALLTYPE SOSetTargets( - __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumBuffers, - __in_ecount_opt(NumBuffers) ID3D11Buffer *const *ppSOTargets, - __in_ecount_opt(NumBuffers) const unsigned *pOffsets) + __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumBuffers, + __in_ecount_opt(NumBuffers) ID3D11Buffer *const *ppSOTargets, + __in_ecount_opt(NumBuffers) const unsigned *pOffsets) { SYNCHRONIZED; unsigned i; @@ -1312,10 +1312,10 @@ changed: } virtual void STDMETHODCALLTYPE SOGetTargets( - __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumBuffers, - __out_ecount(NumBuffers) ID3D11Buffer **ppSOTargets + __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumBuffers, + __out_ecount(NumBuffers) ID3D11Buffer **ppSOTargets #if API < 11 - , __out_ecount(NumBuffers) UINT *pOffsets + , __out_ecount(NumBuffers) UINT *pOffsets #endif ) { @@ -1330,7 +1330,7 @@ changed: } virtual void STDMETHODCALLTYPE Begin( - __in ID3D11Asynchronous *pAsync) + __in ID3D11Asynchronous *pAsync) { SYNCHRONIZED; if(caps.queries) @@ -1338,7 +1338,7 @@ changed: } virtual void STDMETHODCALLTYPE End( - __in ID3D11Asynchronous *pAsync) + __in ID3D11Asynchronous *pAsync) { SYNCHRONIZED; if(caps.queries) @@ -1346,10 +1346,10 @@ changed: } virtual HRESULT STDMETHODCALLTYPE GetData( - __in ID3D11Asynchronous *pAsync, - __out_bcount_opt(DataSize) void *pData, - __in unsigned DataSize, - __in unsigned GetDataFlags) + __in ID3D11Asynchronous *pAsync, + __out_bcount_opt(DataSize) void *pData, + __in unsigned DataSize, + __in unsigned GetDataFlags) { SYNCHRONIZED; if(!caps.queries) @@ -1387,8 +1387,8 @@ changed: } virtual void STDMETHODCALLTYPE SetPredication( - __in_opt ID3D11Predicate *pPredicate, - __in BOOL PredicateValue) + __in_opt ID3D11Predicate *pPredicate, + __in BOOL PredicateValue) { SYNCHRONIZED; if(render_predicate.p != pPredicate || render_predicate_value != PredicateValue) @@ -1400,8 +1400,8 @@ changed: } virtual void STDMETHODCALLTYPE GetPredication( - __out_opt ID3D11Predicate **ppPredicate, - __out_opt BOOL *pPredicateValue) + __out_opt ID3D11Predicate **ppPredicate, + __out_opt BOOL *pPredicateValue) { SYNCHRONIZED; if(ppPredicate) @@ -1428,11 +1428,11 @@ changed: } virtual HRESULT STDMETHODCALLTYPE Map( - __in ID3D11Resource *pResource, - __in unsigned Subresource, - __in D3D11_MAP MapType, - __in unsigned MapFlags, - __out D3D11_MAPPED_SUBRESOURCE *pMappedResource) + __in ID3D11Resource *pResource, + __in unsigned Subresource, + __in D3D11_MAP MapType, + __in unsigned MapFlags, + __out D3D11_MAPPED_SUBRESOURCE *pMappedResource) { SYNCHRONIZED; GalliumD3D11Resource<>* resource = (GalliumD3D11Resource<>*)pResource; @@ -1472,8 +1472,8 @@ changed: } virtual void STDMETHODCALLTYPE Unmap( - __in ID3D11Resource *pResource, - __in unsigned Subresource) + __in ID3D11Resource *pResource, + __in unsigned Subresource) { SYNCHRONIZED; GalliumD3D11Resource<>* resource = (GalliumD3D11Resource<>*)pResource; @@ -1481,20 +1481,20 @@ changed: if(i != resource->transfers.end()) { pipe->transfer_unmap(pipe, i->second); - pipe->transfer_destroy(pipe, i->second); + pipe->transfer_destroy(pipe, i->second); resource->transfers.erase(i); } } virtual void STDMETHODCALLTYPE CopySubresourceRegion( - __in ID3D11Resource *pDstResource, - __in unsigned DstSubresource, - __in unsigned DstX, - __in unsigned DstY, - __in unsigned DstZ, - __in ID3D11Resource *pSrcResource, - __in unsigned SrcSubresource, - __in_opt const D3D11_BOX *pSrcBox) + __in ID3D11Resource *pDstResource, + __in unsigned DstSubresource, + __in unsigned DstX, + __in unsigned DstY, + __in unsigned DstZ, + __in ID3D11Resource *pSrcResource, + __in unsigned SrcSubresource, + __in_opt const D3D11_BOX *pSrcBox) { SYNCHRONIZED; GalliumD3D11Resource<>* dst = (GalliumD3D11Resource<>*)pDstResource; @@ -1512,8 +1512,8 @@ changed: } virtual void STDMETHODCALLTYPE CopyResource( - __in ID3D11Resource *pDstResource, - __in ID3D11Resource *pSrcResource) + __in ID3D11Resource *pDstResource, + __in ID3D11Resource *pSrcResource) { SYNCHRONIZED; GalliumD3D11Resource<>* dst = (GalliumD3D11Resource<>*)pDstResource; @@ -1540,12 +1540,12 @@ changed: } virtual void STDMETHODCALLTYPE UpdateSubresource( - __in ID3D11Resource *pDstResource, - __in unsigned DstSubresource, - __in_opt const D3D11_BOX *pDstBox, - __in const void *pSrcData, - __in unsigned SrcRowPitch, - __in unsigned SrcDepthPitch) + __in ID3D11Resource *pDstResource, + __in unsigned DstSubresource, + __in_opt const D3D11_BOX *pDstBox, + __in const void *pSrcData, + __in unsigned SrcRowPitch, + __in unsigned SrcDepthPitch) { SYNCHRONIZED; GalliumD3D11Resource<>* dst = (GalliumD3D11Resource<>*)pDstResource; @@ -1556,17 +1556,17 @@ changed: #if API >= 11 virtual void STDMETHODCALLTYPE CopyStructureCount( - __in ID3D11Buffer *pDstBuffer, - __in unsigned DstAlignedByteOffset, - __in ID3D11UnorderedAccessView *pSrcView) + __in ID3D11Buffer *pDstBuffer, + __in unsigned DstAlignedByteOffset, + __in ID3D11UnorderedAccessView *pSrcView) { SYNCHRONIZED; } #endif virtual void STDMETHODCALLTYPE ClearRenderTargetView( - __in ID3D11RenderTargetView *pRenderTargetView, - __in const float ColorRGBA[4]) + __in ID3D11RenderTargetView *pRenderTargetView, + __in const float ColorRGBA[4]) { SYNCHRONIZED; GalliumD3D11RenderTargetView* view = ((GalliumD3D11RenderTargetView*)pRenderTargetView); @@ -1574,10 +1574,10 @@ changed: } virtual void STDMETHODCALLTYPE ClearDepthStencilView( - __in ID3D11DepthStencilView *pDepthStencilView, - __in unsigned ClearFlags, - __in float Depth, - __in UINT8 Stencil) + __in ID3D11DepthStencilView *pDepthStencilView, + __in unsigned ClearFlags, + __in float Depth, + __in UINT8 Stencil) { SYNCHRONIZED; GalliumD3D11DepthStencilView* view = ((GalliumD3D11DepthStencilView*)pDepthStencilView); @@ -1591,15 +1591,15 @@ changed: #if API >= 11 virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewUint( - __in ID3D11UnorderedAccessView *pUnorderedAccessView, - __in const unsigned Values[ 4 ]) + __in ID3D11UnorderedAccessView *pUnorderedAccessView, + __in const unsigned Values[ 4 ]) { SYNCHRONIZED; } virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat( - __in ID3D11UnorderedAccessView *pUnorderedAccessView, - __in const float Values[ 4 ]) + __in ID3D11UnorderedAccessView *pUnorderedAccessView, + __in const float Values[ 4 ]) { SYNCHRONIZED; } @@ -1631,7 +1631,7 @@ changed: } virtual void STDMETHODCALLTYPE GenerateMips( - __in ID3D11ShaderResourceView *pShaderResourceView) + __in ID3D11ShaderResourceView *pShaderResourceView) { SYNCHRONIZED; @@ -1675,7 +1675,7 @@ changed: #if API >= 11 /* TODO: hack SRVs or sampler states to handle this, or add to Gallium */ virtual void STDMETHODCALLTYPE SetResourceMinLOD( - __in ID3D11Resource *pResource, + __in ID3D11Resource *pResource, float MinLOD) { SYNCHRONIZED; @@ -1688,7 +1688,7 @@ changed: } virtual float STDMETHODCALLTYPE GetResourceMinLOD( - __in ID3D11Resource *pResource) + __in ID3D11Resource *pResource) { SYNCHRONIZED; GalliumD3D11Resource<>* resource = (GalliumD3D11Resource<>*)pResource; @@ -1697,11 +1697,11 @@ changed: #endif virtual void STDMETHODCALLTYPE ResolveSubresource( - __in ID3D11Resource *pDstResource, - __in unsigned DstSubresource, - __in ID3D11Resource *pSrcResource, - __in unsigned SrcSubresource, - __in DXGI_FORMAT Format) + __in ID3D11Resource *pDstResource, + __in unsigned DstSubresource, + __in ID3D11Resource *pSrcResource, + __in unsigned SrcSubresource, + __in DXGI_FORMAT Format) { SYNCHRONIZED; GalliumD3D11Resource<>* dst = (GalliumD3D11Resource<>*)pDstResource; @@ -1713,7 +1713,7 @@ changed: #if API >= 11 virtual void STDMETHODCALLTYPE ExecuteCommandList( - __in ID3D11CommandList *pCommandList, + __in ID3D11CommandList *pCommandList, BOOL RestoreContextState) { SYNCHRONIZED; @@ -1721,7 +1721,7 @@ changed: virtual HRESULT STDMETHODCALLTYPE FinishCommandList( BOOL RestoreDeferredContextState, - __out_opt ID3D11CommandList **ppCommandList) + __out_opt ID3D11CommandList **ppCommandList) { SYNCHRONIZED; return E_NOTIMPL; diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h index f31b54ba8f..f5cfd0cfab 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_misc.h @@ -1,12 +1,12 @@ #if API < 11 extern "C" HRESULT STDMETHODCALLTYPE D3D10CreateBlob( - __in SIZE_T NumBytes, - __out LPD3D10BLOB *ppBuffer + __in SIZE_T NumBytes, + __out LPD3D10BLOB *ppBuffer ); HRESULT STDMETHODCALLTYPE D3D10CreateBlob( - __in SIZE_T NumBytes, - __out LPD3D10BLOB *ppBuffer + __in SIZE_T NumBytes, + __out LPD3D10BLOB *ppBuffer ) { void* data = malloc(NumBytes); @@ -17,21 +17,21 @@ HRESULT STDMETHODCALLTYPE D3D10CreateBlob( } LPCSTR STDMETHODCALLTYPE D3D10GetPixelShaderProfile( - __in ID3D10Device *pDevice + __in ID3D10Device *pDevice ) { return "ps_4_0"; } LPCSTR STDMETHODCALLTYPE D3D10GetVertexShaderProfile( - __in ID3D10Device *pDevice + __in ID3D10Device *pDevice ) { return "vs_4_0"; } LPCSTR STDMETHODCALLTYPE D3D10GetGeometryShaderProfile( - __in ID3D10Device *pDevice + __in ID3D10Device *pDevice ) { return "gs_4_0"; @@ -46,10 +46,10 @@ static HRESULT dxbc_assemble_as_blob(struct dxbc_chunk_header** chunks, unsigned return S_OK; } -HRESULT D3D10GetInputSignatureBlob( - __in const void *pShaderBytecode, - __in SIZE_T BytecodeLength, - __out ID3D10Blob **ppSignatureBlob +HRESULT D3D10GetInputSignatureBlob( + __in const void *pShaderBytecode, + __in SIZE_T BytecodeLength, + __out ID3D10Blob **ppSignatureBlob ) { dxbc_chunk_signature* sig = dxbc_find_signature(pShaderBytecode, BytecodeLength, false); @@ -59,10 +59,10 @@ HRESULT D3D10GetInputSignatureBlob( return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob); } -HRESULT D3D10GetOutputSignatureBlob( - __in const void *pShaderBytecode, - __in SIZE_T BytecodeLength, - __out ID3D10Blob **ppSignatureBlob +HRESULT D3D10GetOutputSignatureBlob( + __in const void *pShaderBytecode, + __in SIZE_T BytecodeLength, + __out ID3D10Blob **ppSignatureBlob ) { dxbc_chunk_signature* sig = dxbc_find_signature(pShaderBytecode, BytecodeLength, true); @@ -72,10 +72,10 @@ HRESULT D3D10GetOutputSignatureBlob( return dxbc_assemble_as_blob((dxbc_chunk_header**)&sig, 1, ppSignatureBlob); } -HRESULT D3D10GetInputAndOutputSignatureBlob( - __in const void *pShaderBytecode, - __in SIZE_T BytecodeLength, - __out ID3D10Blob **ppSignatureBlob +HRESULT D3D10GetInputAndOutputSignatureBlob( + __in const void *pShaderBytecode, + __in SIZE_T BytecodeLength, + __out ID3D10Blob **ppSignatureBlob ) { dxbc_chunk_signature* sigs[2]; diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h index b7542fd30e..0cf2cf3cf7 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_objects.h @@ -71,8 +71,8 @@ struct GalliumD3D11DeviceChild : public GalliumPrivateDataComObject<Base, dual_r } virtual void STDMETHODCALLTYPE GetDevice( - __out ID3D11Device **ppDevice - ) + __out ID3D11Device **ppDevice + ) { device->AddRef(); *ppDevice = device; @@ -242,7 +242,7 @@ struct GalliumD3D11ResourceBase : public GalliumD3D11DeviceChild<Base> unsigned eviction_priority; virtual void STDMETHODCALLTYPE SetEvictionPriority( - __in unsigned EvictionPriority) + __in unsigned EvictionPriority) { eviction_priority = EvictionPriority; } @@ -257,7 +257,7 @@ template<typename Real> struct GalliumDXGIResource : public IDXGIResource { virtual HRESULT STDMETHODCALLTYPE SetEvictionPriority( - __in unsigned EvictionPriority) + __in unsigned EvictionPriority) { static_cast<Real*>(this)->eviction_priority = EvictionPriority; return S_OK; @@ -265,13 +265,13 @@ struct GalliumDXGIResource : public IDXGIResource virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority(unsigned* pEvictionPriority) { - *pEvictionPriority = static_cast<Real*>(this)->eviction_priority; - return S_OK; + *pEvictionPriority = static_cast<Real*>(this)->eviction_priority; + return S_OK; } virtual HRESULT STDMETHODCALLTYPE GetDevice( - __in REFIID riid, - __out void **ppParent) + __in REFIID riid, + __out void **ppParent) { if(!static_cast<Real*>(this)->device) return E_NOINTERFACE; @@ -279,8 +279,8 @@ struct GalliumDXGIResource : public IDXGIResource } virtual HRESULT STDMETHODCALLTYPE GetParent( - __in REFIID riid, - __out void **ppParent) + __in REFIID riid, + __out void **ppParent) { if(!static_cast<Real*>(this)->device) return E_NOINTERFACE; @@ -322,8 +322,8 @@ struct GalliumD3D11Resource } virtual HRESULT STDMETHODCALLTYPE GetUsage( - __out DXGI_USAGE *pUsage - ) + __out DXGI_USAGE *pUsage + ) { *pUsage = this->dxgi_usage; return S_OK; @@ -349,7 +349,7 @@ struct GalliumD3D11TypedResource : public GalliumD3D11Resource<Base> : GalliumD3D11Resource<Base>(device, resource, dxgi_usage), desc(desc) {} virtual void STDMETHODCALLTYPE GetType( - __out D3D11_RESOURCE_DIMENSION *pResourceDimension) + __out D3D11_RESOURCE_DIMENSION *pResourceDimension) { *pResourceDimension = Dim; } @@ -381,23 +381,23 @@ struct GalliumD3D10Buffer : public GalliumD3D10BufferBase device->UnbindBuffer(this); } - virtual HRESULT STDMETHODCALLTYPE Map( - __in D3D10_MAP MapType, - __in unsigned MapFlags, - __out void **ppData) - { - D3D10_MAPPED_SUBRESOURCE msr; - HRESULT hr = device->Map(this, 0, MapType, MapFlags, &msr); - if(!SUCCEEDED(hr)) - return hr; - *ppData = msr.pData; - return S_OK; - } - - virtual void STDMETHODCALLTYPE Unmap() - { - device->Unmap(this, 0); - } + virtual HRESULT STDMETHODCALLTYPE Map( + __in D3D10_MAP MapType, + __in unsigned MapFlags, + __out void **ppData) + { + D3D10_MAPPED_SUBRESOURCE msr; + HRESULT hr = device->Map(this, 0, MapType, MapFlags, &msr); + if(!SUCCEEDED(hr)) + return hr; + *ppData = msr.pData; + return S_OK; + } + + virtual void STDMETHODCALLTYPE Unmap() + { + device->Unmap(this, 0); + } }; struct GalliumD3D10Texture1D : public GalliumD3D10Texture1DBase @@ -407,25 +407,25 @@ struct GalliumD3D10Texture1D : public GalliumD3D10Texture1DBase {} virtual HRESULT STDMETHODCALLTYPE Map( - __in unsigned Subresource, - __in D3D10_MAP MapType, - __in unsigned MapFlags, - __out void **ppData) - { - D3D10_MAPPED_SUBRESOURCE msr; - HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); - if(!SUCCEEDED(hr)) - return hr; - *ppData = msr.pData; - return S_OK; - } - - virtual void STDMETHODCALLTYPE Unmap( - __in unsigned Subresource - ) - { - device->Unmap(this, Subresource); - } + __in unsigned Subresource, + __in D3D10_MAP MapType, + __in unsigned MapFlags, + __out void **ppData) + { + D3D10_MAPPED_SUBRESOURCE msr; + HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); + if(!SUCCEEDED(hr)) + return hr; + *ppData = msr.pData; + return S_OK; + } + + virtual void STDMETHODCALLTYPE Unmap( + __in unsigned Subresource + ) + { + device->Unmap(this, Subresource); + } }; struct GalliumD3D10Texture2D : public GalliumD3D10Texture2DBase @@ -436,26 +436,26 @@ struct GalliumD3D10Texture2D : public GalliumD3D10Texture2DBase {} virtual HRESULT STDMETHODCALLTYPE Map( - __in unsigned Subresource, - __in D3D10_MAP MapType, - __in unsigned MapFlags, - __out D3D10_MAPPED_TEXTURE2D *pMappedTex2D) - { - D3D10_MAPPED_SUBRESOURCE msr; - HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); - if(!SUCCEEDED(hr)) - return hr; - pMappedTex2D->pData = msr.pData; - pMappedTex2D->RowPitch = msr.RowPitch; - return S_OK; - } - - virtual void STDMETHODCALLTYPE Unmap( - __in unsigned Subresource - ) - { - device->Unmap(this, Subresource); - } + __in unsigned Subresource, + __in D3D10_MAP MapType, + __in unsigned MapFlags, + __out D3D10_MAPPED_TEXTURE2D *pMappedTex2D) + { + D3D10_MAPPED_SUBRESOURCE msr; + HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); + if(!SUCCEEDED(hr)) + return hr; + pMappedTex2D->pData = msr.pData; + pMappedTex2D->RowPitch = msr.RowPitch; + return S_OK; + } + + virtual void STDMETHODCALLTYPE Unmap( + __in unsigned Subresource + ) + { + device->Unmap(this, Subresource); + } }; @@ -466,27 +466,27 @@ struct GalliumD3D10Texture3D : public GalliumD3D10Texture3DBase {} virtual HRESULT STDMETHODCALLTYPE Map( - __in unsigned Subresource, - __in D3D10_MAP MapType, - __in unsigned MapFlags, - __out D3D10_MAPPED_TEXTURE3D *pMappedTex3D) - { - D3D10_MAPPED_SUBRESOURCE msr; - HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); - if(!SUCCEEDED(hr)) - return hr; - pMappedTex3D->pData = msr.pData; - pMappedTex3D->RowPitch = msr.RowPitch; - pMappedTex3D->DepthPitch = msr.DepthPitch; - return S_OK; - } - - virtual void STDMETHODCALLTYPE Unmap( - __in unsigned Subresource - ) - { - device->Unmap(this, Subresource); - } + __in unsigned Subresource, + __in D3D10_MAP MapType, + __in unsigned MapFlags, + __out D3D10_MAPPED_TEXTURE3D *pMappedTex3D) + { + D3D10_MAPPED_SUBRESOURCE msr; + HRESULT hr = device->Map(this, Subresource, MapType, MapFlags, &msr); + if(!SUCCEEDED(hr)) + return hr; + pMappedTex3D->pData = msr.pData; + pMappedTex3D->RowPitch = msr.RowPitch; + pMappedTex3D->DepthPitch = msr.DepthPitch; + return S_OK; + } + + virtual void STDMETHODCALLTYPE Unmap( + __in unsigned Subresource + ) + { + device->Unmap(this, Subresource); + } }; #endif @@ -502,7 +502,7 @@ struct GalliumD3D11Surface : public GalliumMultiPrivateDataComObject<GalliumD3D1 } virtual HRESULT STDMETHODCALLTYPE GetDesc( - __out DXGI_SURFACE_DESC *pDesc) + __out DXGI_SURFACE_DESC *pDesc) { pDesc->Format = this->desc.Format; pDesc->Width = this->desc.Width; @@ -512,8 +512,8 @@ struct GalliumD3D11Surface : public GalliumMultiPrivateDataComObject<GalliumD3D1 } virtual HRESULT STDMETHODCALLTYPE GetParent( - __in REFIID riid, - __out void **ppParent) + __in REFIID riid, + __out void **ppParent) { if(!device) return E_NOINTERFACE; @@ -523,20 +523,20 @@ struct GalliumD3D11Surface : public GalliumMultiPrivateDataComObject<GalliumD3D1 /* TODO: somehow implement these */ virtual HRESULT STDMETHODCALLTYPE GetDC( BOOL Discard, - __out HDC *phdc) + __out HDC *phdc) { *phdc = 0; return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE ReleaseDC( - __in_opt RECT *pDirtyRect) + __in_opt RECT *pDirtyRect) { return E_NOTIMPL; } virtual HRESULT STDMETHODCALLTYPE Map( - __out DXGI_MAPPED_RECT *pLockedRect, + __out DXGI_MAPPED_RECT *pLockedRect, unsigned MapFlags) { D3D11_MAP d3d_map; @@ -568,8 +568,8 @@ struct GalliumD3D11Surface : public GalliumMultiPrivateDataComObject<GalliumD3D1 } virtual HRESULT STDMETHODCALLTYPE GetDevice( - __in REFIID riid, - __out void **ppParent) + __in REFIID riid, + __out void **ppParent) { if(!device) return E_NOINTERFACE; @@ -657,9 +657,9 @@ struct GalliumD3D11Asynchronous : public GalliumD3D11DeviceChild<Base> } virtual HRESULT STDMETHODCALLTYPE GetData( - __out_bcount(DataSize) void *pData, - __in unsigned DataSize, - __in unsigned GetDataFlags) + __out_bcount(DataSize) void *pData, + __in unsigned DataSize, + __in unsigned GetDataFlags) { return this->device->GetData(this, pData, DataSize, GetDataFlags); } @@ -675,7 +675,7 @@ struct GalliumD3D11QueryOrPredicate : public GalliumD3D11Asynchronous<Base> {} virtual void STDMETHODCALLTYPE GetDesc( - __out D3D11_QUERY_DESC *pDesc) + __out D3D11_QUERY_DESC *pDesc) { *pDesc = desc; } @@ -708,7 +708,7 @@ struct GalliumD3D11Counter : public GalliumD3D11Asynchronous<ID3D11Counter> {} virtual void STDMETHODCALLTYPE GetDesc( - __out D3D11_COUNTER_DESC *pDesc) + __out D3D11_COUNTER_DESC *pDesc) { *pDesc = desc; } diff --git a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h index 0c8d3ed943..eea0e21f20 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h +++ b/src/gallium/state_trackers/d3d1x/gd3d11/d3d11_screen.h @@ -32,7 +32,7 @@ static unsigned caps_dx_9_1[] = { UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 8), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ UTIL_CHECK_TERMINATE }; @@ -45,7 +45,7 @@ static unsigned caps_dx_9_2[] = { UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ UTIL_CHECK_TERMINATE }; @@ -61,7 +61,7 @@ static unsigned caps_dx_9_3[] = { UTIL_CHECK_INT(MAX_RENDER_TARGETS, 4), UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 13), /* 4096 */ UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ UTIL_CHECK_TERMINATE }; @@ -166,7 +166,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual void STDMETHODCALLTYPE GetImmediateContext( - __out ID3D11DeviceContext **ppImmediateContext) + __out ID3D11DeviceContext **ppImmediateContext) { immediate_context->AddRef(); *ppImmediateContext = immediate_context; @@ -185,21 +185,21 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CheckCounter( - __in const D3D11_COUNTER_DESC *pDesc, - __out D3D11_COUNTER_TYPE *pType, - __out unsigned *pActiveCounters, - __out_ecount_opt(*pNameLength) LPSTR szName, - __inout_opt unsigned *pNameLength, - __out_ecount_opt(*pUnitsLength) LPSTR szUnits, - __inout_opt unsigned *pUnitsLength, - __out_ecount_opt(*pDescriptionLength) LPSTR szDescription, - __inout_opt unsigned *pDescriptionLength) + __in const D3D11_COUNTER_DESC *pDesc, + __out D3D11_COUNTER_TYPE *pType, + __out unsigned *pActiveCounters, + __out_ecount_opt(*pNameLength) LPSTR szName, + __inout_opt unsigned *pNameLength, + __out_ecount_opt(*pUnitsLength) LPSTR szUnits, + __inout_opt unsigned *pUnitsLength, + __out_ecount_opt(*pDescriptionLength) LPSTR szDescription, + __inout_opt unsigned *pDescriptionLength) { return E_NOTIMPL; } virtual void STDMETHODCALLTYPE CheckCounterInfo( - __out D3D11_COUNTER_INFO *pCounterInfo) + __out D3D11_COUNTER_INFO *pCounterInfo) { /* none supported at the moment */ pCounterInfo->LastDeviceDependentCounter = (D3D11_COUNTER)0; @@ -210,7 +210,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( D3D11_FEATURE Feature, - __out_bcount(FeatureSupportDataSize) void *pFeatureSupportData, + __out_bcount(FeatureSupportDataSize) void *pFeatureSupportData, unsigned FeatureSupportDataSize) { SYNCHRONIZED; @@ -360,13 +360,13 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual HRESULT STDMETHODCALLTYPE CreateBlendState( - __in const D3D11_BLEND_DESC *pBlendStateDesc, - __out_opt ID3D11BlendState **ppBlendState + __in const D3D11_BLEND_DESC *pBlendStateDesc, + __out_opt ID3D11BlendState **ppBlendState ) #else virtual HRESULT STDMETHODCALLTYPE CreateBlendState1( - __in const D3D10_BLEND_DESC1 *pBlendStateDesc, - __out_opt ID3D10BlendState1 **ppBlendState + __in const D3D10_BLEND_DESC1 *pBlendStateDesc, + __out_opt ID3D10BlendState1 **ppBlendState ) #endif { @@ -379,12 +379,12 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen assert(PIPE_MAX_COLOR_BUFS >= 8); for(unsigned i = 0; i < 8; ++i) { - if(!convert_blend_state( - state.rt[i], - pBlendStateDesc->RenderTarget[i], - pBlendStateDesc->RenderTarget[i].BlendEnable, - pBlendStateDesc->RenderTarget[i].RenderTargetWriteMask)) - return E_INVALIDARG; + if(!convert_blend_state( + state.rt[i], + pBlendStateDesc->RenderTarget[i], + pBlendStateDesc->RenderTarget[i].BlendEnable, + pBlendStateDesc->RenderTarget[i].RenderTargetWriteMask)) + return E_INVALIDARG; } if(!ppBlendState) @@ -400,8 +400,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API < 11 virtual HRESULT STDMETHODCALLTYPE CreateBlendState( - __in const D3D10_BLEND_DESC *pBlendStateDesc, - __out_opt ID3D10BlendState **ppBlendState + __in const D3D10_BLEND_DESC *pBlendStateDesc, + __out_opt ID3D10BlendState **ppBlendState ) { SYNCHRONIZED; @@ -439,8 +439,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #endif virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState( - __in const D3D11_DEPTH_STENCIL_DESC *pDepthStencilStateDesc, - __out_opt ID3D11DepthStencilState **ppDepthStencilState + __in const D3D11_DEPTH_STENCIL_DESC *pDepthStencilStateDesc, + __out_opt ID3D11DepthStencilState **ppDepthStencilState ) { SYNCHRONIZED; @@ -477,8 +477,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState( - __in const D3D11_RASTERIZER_DESC *pRasterizerDesc, - __out_opt ID3D11RasterizerState **ppRasterizerState) + __in const D3D11_RASTERIZER_DESC *pRasterizerDesc, + __out_opt ID3D11RasterizerState **ppRasterizerState) { SYNCHRONIZED; @@ -487,13 +487,13 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen state.gl_rasterization_rules = 1; /* D3D10/11 use GL rules */ state.fill_front = state.fill_back = (pRasterizerDesc->FillMode == D3D11_FILL_WIREFRAME) ? PIPE_POLYGON_MODE_LINE : PIPE_POLYGON_MODE_FILL; if(pRasterizerDesc->CullMode == D3D11_CULL_FRONT) - state.cull_face = PIPE_FACE_FRONT; + state.cull_face = PIPE_FACE_FRONT; else if(pRasterizerDesc->CullMode == D3D11_CULL_BACK) - state.cull_face = PIPE_FACE_BACK; + state.cull_face = PIPE_FACE_BACK; else - state.cull_face = PIPE_FACE_NONE; + state.cull_face = PIPE_FACE_NONE; state.front_ccw = !!pRasterizerDesc->FrontCounterClockwise; - /* TODO: is this correct? */ + /* TODO: is this correct? */ /* TODO: we are ignoring DepthBiasClamp! */ state.offset_tri = state.offset_line = state.offset_point = pRasterizerDesc->SlopeScaledDepthBias || pRasterizerDesc->DepthBias; state.offset_scale = pRasterizerDesc->SlopeScaledDepthBias; @@ -517,8 +517,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateSamplerState( - __in const D3D11_SAMPLER_DESC *pSamplerDesc, - __out_opt ID3D11SamplerState **ppSamplerState) + __in const D3D11_SAMPLER_DESC *pSamplerDesc, + __out_opt ID3D11SamplerState **ppSamplerState) { SYNCHRONIZED; @@ -555,11 +555,11 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateInputLayout( - __in_ecount(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, - __in_range(0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT) unsigned NumElements, - __in const void *pShaderBytecodeWithInputSignature, - __in SIZE_T BytecodeLength, - __out_opt ID3D11InputLayout **ppInputLayout) + __in_ecount(NumElements) const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, + __in_range(0, D3D11_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT) unsigned NumElements, + __in const void *pShaderBytecodeWithInputSignature, + __in SIZE_T BytecodeLength, + __out_opt ID3D11InputLayout **ppInputLayout) { SYNCHRONIZED; @@ -738,9 +738,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateTexture1D( - __in const D3D11_TEXTURE1D_DESC *pDesc, - __in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize) const D3D11_SUBRESOURCE_DATA *pInitialData, - __out_opt ID3D11Texture1D **ppTexture1D) + __in const D3D11_TEXTURE1D_DESC *pDesc, + __in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize) const D3D11_SUBRESOURCE_DATA *pInitialData, + __out_opt ID3D11Texture1D **ppTexture1D) { SYNCHRONIZED; @@ -754,9 +754,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateTexture2D( - __in const D3D11_TEXTURE2D_DESC *pDesc, - __in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize) const D3D11_SUBRESOURCE_DATA *pInitialData, - __out_opt ID3D11Texture2D **ppTexture2D) + __in const D3D11_TEXTURE2D_DESC *pDesc, + __in_xcount_opt(pDesc->MipLevels * pDesc->ArraySize) const D3D11_SUBRESOURCE_DATA *pInitialData, + __out_opt ID3D11Texture2D **ppTexture2D) { SYNCHRONIZED; @@ -773,9 +773,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateTexture3D( - __in const D3D11_TEXTURE3D_DESC *pDesc, - __in_xcount_opt(pDesc->MipLevels) const D3D11_SUBRESOURCE_DATA *pInitialData, - __out_opt ID3D11Texture3D **ppTexture3D) + __in const D3D11_TEXTURE3D_DESC *pDesc, + __in_xcount_opt(pDesc->MipLevels) const D3D11_SUBRESOURCE_DATA *pInitialData, + __out_opt ID3D11Texture3D **ppTexture3D) { SYNCHRONIZED; @@ -789,9 +789,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateBuffer( - __in const D3D11_BUFFER_DESC *pDesc, - __in_opt const D3D11_SUBRESOURCE_DATA *pInitialData, - __out_opt ID3D11Buffer **ppBuffer) + __in const D3D11_BUFFER_DESC *pDesc, + __in_opt const D3D11_SUBRESOURCE_DATA *pInitialData, + __out_opt ID3D11Buffer **ppBuffer) { SYNCHRONIZED; @@ -809,8 +809,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE OpenGalliumResource( - __in struct pipe_resource* resource, - __out IUnknown** dxgi_resource) + __in struct pipe_resource* resource, + __out IUnknown** dxgi_resource) { SYNCHRONIZED; @@ -845,11 +845,11 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateSurface( - __in const DXGI_SURFACE_DESC *pDesc, + __in const DXGI_SURFACE_DESC *pDesc, unsigned NumSurfaces, DXGI_USAGE Usage, - __in_opt const DXGI_SHARED_RESOURCE *pSharedResource, - __out IDXGISurface **ppSurface) + __in_opt const DXGI_SHARED_RESOURCE *pSharedResource, + __out IDXGISurface **ppSurface) { SYNCHRONIZED; @@ -882,9 +882,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView( - __in ID3D11Resource *pResource, - __in_opt const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, - __out_opt ID3D11ShaderResourceView **ppSRView) + __in ID3D11Resource *pResource, + __in_opt const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, + __out_opt ID3D11ShaderResourceView **ppSRView) { #if API >= 11 D3D11_SHADER_RESOURCE_VIEW_DESC def_desc; @@ -898,9 +898,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView1( - __in ID3D11Resource *pResource, - __in_opt const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, - __out_opt ID3D10ShaderResourceView1 **ppSRView) + __in ID3D11Resource *pResource, + __in_opt const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, + __out_opt ID3D10ShaderResourceView1 **ppSRView) { D3D10_SHADER_RESOURCE_VIEW_DESC1 def_desc; #endif @@ -988,9 +988,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView( - __in ID3D11Resource *pResource, - __in_opt const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, - __out_opt ID3D11UnorderedAccessView **ppUAView) + __in ID3D11Resource *pResource, + __in_opt const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, + __out_opt ID3D11UnorderedAccessView **ppUAView) { SYNCHRONIZED; @@ -1001,9 +1001,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #endif virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView( - __in ID3D11Resource *pResource, - __in_opt const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, - __out_opt ID3D11RenderTargetView **ppRTView) + __in ID3D11Resource *pResource, + __in_opt const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, + __out_opt ID3D11RenderTargetView **ppRTView) { SYNCHRONIZED; @@ -1092,9 +1092,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView( - __in ID3D11Resource *pResource, - __in_opt const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, - __out_opt ID3D11DepthStencilView **ppDepthStencilView) + __in ID3D11Resource *pResource, + __in_opt const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, + __out_opt ID3D11DepthStencilView **ppDepthStencilView) { SYNCHRONIZED; @@ -1168,7 +1168,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen GalliumD3D11Shader<>* create_stage_shader(unsigned type, const void *pShaderBytecode, SIZE_T BytecodeLength #if API >= 11 - , __in_opt ID3D11ClassLinkage *pClassLinkage + , __in_opt ID3D11ClassLinkage *pClassLinkage #endif ) { @@ -1221,21 +1221,21 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 #define CREATE_SHADER_ARGS \ - __in const void *pShaderBytecode, \ - __in SIZE_T BytecodeLength, \ - __in_opt ID3D11ClassLinkage *pClassLinkage + __in const void *pShaderBytecode, \ + __in SIZE_T BytecodeLength, \ + __in_opt ID3D11ClassLinkage *pClassLinkage #define PASS_SHADER_ARGS pShaderBytecode, BytecodeLength, pClassLinkage #else #define CREATE_SHADER_ARGS \ - __in const void *pShaderBytecode, \ - __in SIZE_T BytecodeLength + __in const void *pShaderBytecode, \ + __in SIZE_T BytecodeLength #define PASS_SHADER_ARGS pShaderBytecode, BytecodeLength #endif #define IMPLEMENT_CREATE_SHADER(Stage, GALLIUM) \ virtual HRESULT STDMETHODCALLTYPE Create##Stage##Shader( \ CREATE_SHADER_ARGS, \ - __out_opt ID3D11##Stage##Shader **pp##Stage##Shader) \ + __out_opt ID3D11##Stage##Shader **pp##Stage##Shader) \ { \ SYNCHRONIZED; \ GalliumD3D11##Stage##Shader* shader = (GalliumD3D11##Stage##Shader*)create_stage_shader(PIPE_SHADER_##GALLIUM, PASS_SHADER_ARGS); \ @@ -1256,7 +1256,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #define IMPLEMENT_NOTIMPL_CREATE_SHADER(Stage) \ virtual HRESULT STDMETHODCALLTYPE Create##Stage##Shader( \ CREATE_SHADER_ARGS, \ - __out_opt ID3D11##Stage##Shader **pp##Stage##Shader) \ + __out_opt ID3D11##Stage##Shader **pp##Stage##Shader) \ { \ return E_NOTIMPL; \ } @@ -1271,19 +1271,19 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #endif virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( - __in const void *pShaderBytecode, - __in SIZE_T BytecodeLength, - __in_ecount_opt(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, - __in_range(0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT) unsigned NumEntries, + __in const void *pShaderBytecode, + __in SIZE_T BytecodeLength, + __in_ecount_opt(NumEntries) const D3D11_SO_DECLARATION_ENTRY *pSODeclaration, + __in_range(0, D3D11_SO_STREAM_COUNT * D3D11_SO_OUTPUT_COMPONENT_COUNT) unsigned NumEntries, #if API >= 11 - __in_ecount_opt(NumStrides) const unsigned *pBufferStrides, - __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumStrides, - __in unsigned RasterizedStream, - __in_opt ID3D11ClassLinkage *pClassLinkage, + __in_ecount_opt(NumStrides) const unsigned *pBufferStrides, + __in_range(0, D3D11_SO_BUFFER_SLOT_COUNT) unsigned NumStrides, + __in unsigned RasterizedStream, + __in_opt ID3D11ClassLinkage *pClassLinkage, #else - __in UINT OutputStreamStride, + __in UINT OutputStreamStride, #endif - __out_opt ID3D11GeometryShader **ppGeometryShader) + __out_opt ID3D11GeometryShader **ppGeometryShader) { SYNCHRONIZED; @@ -1297,7 +1297,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual HRESULT STDMETHODCALLTYPE CreateClassLinkage( - __out ID3D11ClassLinkage **ppLinkage) + __out ID3D11ClassLinkage **ppLinkage) { SYNCHRONIZED; @@ -1309,8 +1309,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #endif virtual HRESULT STDMETHODCALLTYPE CreateQuery( - __in const D3D11_QUERY_DESC *pQueryDesc, - __out_opt ID3D11Query **ppQuery) + __in const D3D11_QUERY_DESC *pQueryDesc, + __out_opt ID3D11Query **ppQuery) { SYNCHRONIZED; @@ -1332,8 +1332,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen } virtual HRESULT STDMETHODCALLTYPE CreatePredicate( - __in const D3D11_QUERY_DESC *pPredicateDesc, - __out_opt ID3D11Predicate **ppPredicate) + __in const D3D11_QUERY_DESC *pPredicateDesc, + __out_opt ID3D11Predicate **ppPredicate) { SYNCHRONIZED; @@ -1362,8 +1362,8 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen virtual HRESULT STDMETHODCALLTYPE CreateCounter( - __in const D3D11_COUNTER_DESC *pCounterDesc, - __out_opt ID3D11Counter **ppCounter) + __in const D3D11_COUNTER_DESC *pCounterDesc, + __out_opt ID3D11Counter **ppCounter) { SYNCHRONIZED; @@ -1375,7 +1375,7 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #if API >= 11 virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext( unsigned ContextFlags, - __out_opt ID3D11DeviceContext **ppDeferredContext) + __out_opt ID3D11DeviceContext **ppDeferredContext) { SYNCHRONIZED; @@ -1387,9 +1387,9 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen #endif virtual HRESULT STDMETHODCALLTYPE OpenSharedResource( - __in HANDLE hResource, - __in REFIID ReturnedInterface, - __out_opt void **ppResource) + __in HANDLE hResource, + __in REFIID ReturnedInterface, + __out_opt void **ppResource) { SYNCHRONIZED; @@ -1414,14 +1414,14 @@ struct GalliumD3D11ScreenImpl : public GalliumD3D11Screen * Probably nothing uses these, assuming it has ever been implemented anywhere. */ void STDMETHODCALLTYPE SetTextFilterSize( - __in UINT Width, - __in UINT Height + __in UINT Width, + __in UINT Height ) {} virtual void STDMETHODCALLTYPE GetTextFilterSize( - __in UINT *Width, - __in UINT *Height + __in UINT *Width, + __in UINT *Height ) {} #endif diff --git a/src/gallium/state_trackers/d3d1x/gd3d1x/d3d_enums.cpp b/src/gallium/state_trackers/d3d1x/gd3d1x/d3d_enums.cpp index 7932e438c9..37113a6ec9 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d1x/d3d_enums.cpp +++ b/src/gallium/state_trackers/d3d1x/gd3d1x/d3d_enums.cpp @@ -41,7 +41,7 @@ unsigned d3d11_to_pipe_blend[D3D11_BLEND_COUNT] = PIPE_BLENDFACTOR_INV_DST_COLOR, PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE, 0, /* absent in D3D11 */ - 0, /* absent in D3D11 */ + 0, /* absent in D3D11 */ PIPE_BLENDFACTOR_CONST_COLOR, PIPE_BLENDFACTOR_INV_CONST_COLOR, PIPE_BLENDFACTOR_SRC1_COLOR, diff --git a/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp b/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp index 995059e15b..4b43a3325c 100644 --- a/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp +++ b/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp @@ -220,7 +220,7 @@ struct sm4_to_tgsi_converter #define OP1(n) OP1_(n, n) #define OP2(n) OP2_(n, n) #define OP3(n) OP3_(n, n) -#define OP_CF(d, g) case SM4_OPCODE_##d: ureg_##g(ureg, &label); label_to_sm4_insn_num.push_back(std::make_pair(label, program.cf_insn_linked[insn_num])); break; +#define OP_CF(d, g) case SM4_OPCODE_##d: ureg_##g(ureg, &label); label_to_sm4_insn_num.push_back(std::make_pair(label, program.cf_insn_linked[insn_num])); break; void translate_insns(unsigned begin, unsigned end) { diff --git a/src/gallium/state_trackers/d3d1x/gd3dapi/galliumcom.idl b/src/gallium/state_trackers/d3d1x/gd3dapi/galliumcom.idl index c42e10cb66..96faf1c070 100644 --- a/src/gallium/state_trackers/d3d1x/gd3dapi/galliumcom.idl +++ b/src/gallium/state_trackers/d3d1x/gd3dapi/galliumcom.idl @@ -42,7 +42,7 @@ interface IGalliumDevice : IUnknown { // turn Gallium resource into API resource HRESULT OpenGalliumResource( - [in] struct pipe_resource* resource, + [in] struct pipe_resource* resource, [out] IUnknown** api_resource ); diff --git a/src/gallium/state_trackers/d3d1x/gd3dapi/galliumdxgi.idl b/src/gallium/state_trackers/d3d1x/gd3dapi/galliumdxgi.idl index e6f5147209..92fda3385b 100644 --- a/src/gallium/state_trackers/d3d1x/gd3dapi/galliumdxgi.idl +++ b/src/gallium/state_trackers/d3d1x/gd3dapi/galliumdxgi.idl @@ -90,7 +90,7 @@ interface IGalliumDXGIBackend : IUnknown * EndPresent is still called even if you return 0 in window. */ void* BeginPresent( - [in] HWND hwnd, + [in] HWND hwnd, [out] void** window, [out] RECT* rect, [out] struct _RGNDATA** rgndata, @@ -98,7 +98,7 @@ interface IGalliumDXGIBackend : IUnknown ); void EndPresent( - [in] HWND hwnd, + [in] HWND hwnd, [out] void* present_cookie ); } diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp index 0fcef0d7b6..a8f24ae303 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d10app/d3d10x11main.cpp @@ -86,7 +86,7 @@ int main(int argc, char** argv) HRESULT hr;
if(0)
{
- hr = D3D10CreateDeviceAndSwapChain(
+ hr = D3D10CreateDeviceAndSwapChain(
NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL,
@@ -98,7 +98,7 @@ int main(int argc, char** argv) }
else
{
- hr = D3D10CreateDeviceAndSwapChain1(
+ hr = D3D10CreateDeviceAndSwapChain1(
NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL,
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp index 4e92f0a544..06ad811dec 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d10tri/d3d10tri.cpp @@ -29,24 +29,24 @@ #include "d3d10tri.hlsl.vs.h"
struct vertex {
- float position[4];
- float color[4];
+ float position[4];
+ float color[4];
};
static struct vertex vertices[3] =
{
- {
- { 0.0f, 0.9f, 0.5f, 1.0f },
- { 1.0f, 0.0f, 0.0f, 1.0f }
- },
- {
- { 0.9f, -0.9f, 0.5f, 1.0f },
- { 0.0f, 0.0f, 1.0f, 1.0f }
- },
- {
- { -0.9f, -0.9f, 0.5f, 1.0f },
- { 0.0f, 1.0f, 0.0f, 1.0f }
- },
+ {
+ { 0.0f, 0.9f, 0.5f, 1.0f },
+ { 1.0f, 0.0f, 0.0f, 1.0f }
+ },
+ {
+ { 0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f }
+ },
+ {
+ { -0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f }
+ },
};
struct d3d10tri : public d3d10_application
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h index 3b0644a573..e67fa09606 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h +++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11u.h @@ -104,7 +104,7 @@ struct mesh this->vertex_size = vertex_size;
index_offset = vertex_size * num_vertices;
- D3D11_BUFFER_DESC bufferd;
+ D3D11_BUFFER_DESC bufferd;
memset(&bufferd, 0, sizeof(bufferd));
bufferd.Usage = D3D11_USAGE_IMMUTABLE;
bufferd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp index 7055da941b..8eb51d3638 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d11app/d3d11x11main.cpp @@ -57,7 +57,7 @@ int main(int argc, char** argv) D3D_FEATURE_LEVEL feature_level = D3D_FEATURE_LEVEL_10_0;
- HRESULT hr =D3D11CreateDeviceAndSwapChain(
+ HRESULT hr =D3D11CreateDeviceAndSwapChain(
NULL,
D3D_DRIVER_TYPE_HARDWARE,
NULL,
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp index 32a63ae6dd..de9946c67e 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d11gears/d3d11gears.cpp @@ -1,6 +1,6 @@ /*
-* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
-* Copyright (C) 2009-2010 Luca Barbieri All Rights Reserved.
+* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+* Copyright (C) 2009-2010 Luca Barbieri All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -14,7 +14,7 @@ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -518,7 +518,7 @@ struct d3d11gears : public d3d11_application gears[2].mesh = build_gear(dev, triangles / 4, 1.3f, 2.0f, 0.5f, 10, 0.7f);
gears[0].x = -3.0f;
- gears[0].y = -2.0f;
+ gears[0].y = -2.0f;
gears[0].wmul = 1.0f;
gears[0].t0 = 0.0 * M_PI / 180.0f;
diff --git a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp index 5622074e19..30c2ffa5cc 100755 --- a/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp +++ b/src/gallium/state_trackers/d3d1x/progs/d3d11tri/d3d11tri.cpp @@ -29,24 +29,24 @@ #include "d3d11tri.hlsl.vs.h"
struct vertex {
- float position[4];
- float color[4];
+ float position[4];
+ float color[4];
};
static struct vertex vertices[3] =
{
- {
- { 0.0f, 0.9f, 0.5f, 1.0f },
- { 1.0f, 0.0f, 0.0f, 1.0f }
- },
- {
- { 0.9f, -0.9f, 0.5f, 1.0f },
- { 0.0f, 0.0f, 1.0f, 1.0f }
- },
- {
- { -0.9f, -0.9f, 0.5f, 1.0f },
- { 0.0f, 1.0f, 0.0f, 1.0f }
- },
+ {
+ { 0.0f, 0.9f, 0.5f, 1.0f },
+ { 1.0f, 0.0f, 0.0f, 1.0f }
+ },
+ {
+ { 0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f }
+ },
+ {
+ { -0.9f, -0.9f, 0.5f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f }
+ },
};
struct d3d11tri : public d3d11_application
|