From 92617aeac109481258f0c3863d09c1b8903d438b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Sun, 12 Sep 2010 02:49:36 +0200 Subject: d3d1x: add new Direct3D 10/11 COM state tracker for Gallium This is a new implementation of the Direct3D 11 COM API for Gallium. Direct3D 10 and 10.1 implementations are also provided, which are automatically generated with s/D3D11/D3D10/g plus a bunch of #ifs. While this is an initial version, most of the code is there (limited to what Gallium can express), and tri, gears and texturing demos are working. The primary goal is to realize Gallium's promise of multiple API support, and provide an API that can be easily implemented with just a very thin wrapper over Gallium, instead of the enormous amount of complex code needed for OpenGL. The secondary goal is to run Windows Direct3D 10/11 games on Linux using Wine. Wine dlls are currently not provided, but adding them should be quite easy. Fglrx and nvidia drivers can also be supported by writing a Gallium driver that talks to them using OpenGL, which is a relatively easy task. Thanks to the great design of Direct3D 10/11 and closeness to Gallium, this approach should not result in detectable overhead, and is the most maintainable way to do it, providing a path to switch to the open Gallium drivers once they are on par with the proprietary ones. Currently Wine has a very limited Direct3D 10 implementation, and completely lacks a Direct3D 11 implementation. Note that Direct3D 10/11 are completely different from Direct3D 9 and earlier, and thus warrant a fully separate implementation. The third goal is to provide a superior alternative to OpenGL for graphics programming on non-Windows systems, particularly Linux and other free and open systems. Thanks to a very clean and well-though design done from scratch, the Direct3D 10/11 APIs are vastly better than OpenGL and can be supported with orders of magnitude less code and development time, as you can see by comparing the lines of code of this commit and those in the existing Mesa OpenGL implementation. This would have been true for the Longs Peak proposal as well, but unfortunately it was abandoned by Khronos, leaving the OpenGL ecosystem without a graphics API with a modern design. A binding of Direct3D 10/11 to EGL would solve this issue in the most economical way possible, and this would be great to provide in Mesa, since DXGI, the API used to bind Direct3D 10/11 to Windows, is a bit suboptimal, especially on non-Windows platforms. Finally, a mature Direct3D 10/11 implementation is intrinsically going to be faster and more reliable than an OpenGL implementation, thanks to the dramatically smaller API and the segregation of all nontrivial work to object creation that the application must perform ahead of time. Currently, this commit contains: - Independently created headers for Direct3D 10, 10.1, 11 and DXGI 1.1, partially based on the existing Wine headers for D3D10 and DXGI 1.0 - A parser for Direct3D 10/11 DXBC and TokenizedProgramFormat (TPF) - A shader translator from TokenizedProgramFormat to TGSI - Implementation of the Direct3D 11 core interfaces - Automatically generated implementation of Direct3D 10 and 10.1 - Implementation of DXGI using the "native" framework of the EGL st - Demos, usable either on Windows or on this implementation - d3d11tri, a clone of tri - d3d11tex, a (multi)texturing demo - d3d11gears, an improved version of glxgears - d3d11spikysphere, a D3D11 tessellation demo (currently Windows-only) - A downloader for the Microsoft HLSL compiler, needed to recompile the shaders (compiled shader bytecode is also included) To compile this, configure at least with these options: --with-state-trackers=egl,d3d1x --with-egl-platforms=x11 plus some gallium drivers (such as softpipe with --enable-gallium-swrast) The Wine headers (usually from a wine-dev or wine-devel package) must be installed. Only x86-32 has been tested. You may need to run "make" in the subdirectories of src/gallium/winsys/sw and you may need to manually run "sudo make install" in src/gallium/targets/egl To test it, run the demos in the "progs" directory. Windows binaries are included to find out how demos should work, and to test Wine integration when it will be done. Enjoy, and let me know if you manage to compile and run this, or which issues you are facing if not. Using softpipe is recommended for now, and your mileage with hardware drivers may vary. However, getting this to work on hardware drivers is also obviously very important. Note that currently llvmpipe is buggy and causes all 3 gears to be drawn with the same color. Use export GALLIUM_DRIVER=softpipe to avoid this. Thanks to all the Gallium contributors and especially the VMware team, whose work made it possible to implement Direct3D 10/11 much more easily than it would have been otherwise. --- .../state_trackers/d3d1x/d3dapi/d3d10_1.idl | 191 +++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl (limited to 'src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl') diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl new file mode 100644 index 00000000000..b507e098901 --- /dev/null +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl @@ -0,0 +1,191 @@ +/************************************************************************** + * + * Copyright 2010 Luca Barbieri + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * 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 THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS 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. + * + **************************************************************************/ + +import "oaidl.idl"; +import "ocidl.idl"; +import "d3d10.idl"; +import "d3dcommon.idl"; + +const unsigned int D3D10_1_SDK_VERSION = 0x20; + +cpp_quote("#ifndef _D3D10_1_CONSTANTS") +cpp_quote("#define _D3D10_1_CONSTANTS") +const unsigned int D3D10_1_DEFAULT_SAMPLE_MASK = 0xffffffff; +const float D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6; +const float D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6; +const unsigned int D3D10_1_GS_INPUT_REGISTER_COUNT = 32; +const unsigned int D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32; +const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128; +const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32; +const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1; +const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32; +const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT = 1; +const unsigned int D3D10_1_SHADER_MAJOR_VERSION = 4; +const unsigned int D3D10_1_SHADER_MINOR_VERSION = 1; +const unsigned int D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048; +const unsigned int D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256; +const unsigned int D3D10_1_SO_BUFFER_SLOT_COUNT = 4; +const unsigned int D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1; +const unsigned int D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64; +const unsigned int D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT = 32; +const unsigned int D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8; +const unsigned int D3D10_1_VS_INPUT_REGISTER_COUNT = 32; +const unsigned int D3D10_1_VS_OUTPUT_REGISTER_COUNT = 32; +cpp_quote("#endif") + +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_LEVEL1; + +typedef struct D3D10_RENDER_TARGET_BLEND_DESC1 +{ + BOOL BlendEnable; + D3D10_BLEND SrcBlend; + D3D10_BLEND DestBlend; + D3D10_BLEND_OP BlendOp; + D3D10_BLEND SrcBlendAlpha; + D3D10_BLEND DestBlendAlpha; + D3D10_BLEND_OP BlendOpAlpha; + UINT8 RenderTargetWriteMask; +} D3D10_RENDER_TARGET_BLEND_DESC1; + +typedef struct D3D10_BLEND_DESC1 +{ + BOOL AlphaToCoverageEnable; + BOOL IndependentBlendEnable; + D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[8]; +} D3D10_BLEND_DESC1; + +typedef struct D3D10_TEXCUBE_ARRAY_SRV1 +{ + UINT MostDetailedMip; + UINT MipLevels; + UINT First2DArrayFace; + UINT NumCubes; +} D3D10_TEXCUBE_ARRAY_SRV1; + +typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION1; + +typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1 +{ + DXGI_FORMAT Format; + D3D10_SRV_DIMENSION1 ViewDimension; + union + { + D3D10_BUFFER_SRV Buffer; + D3D10_TEX1D_SRV Texture1D; + D3D10_TEX1D_ARRAY_SRV Texture1DArray; + D3D10_TEX2D_SRV Texture2D; + D3D10_TEX2D_ARRAY_SRV Texture2DArray; + D3D10_TEX2DMS_SRV Texture2DMS; + D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray; + D3D10_TEX3D_SRV Texture3D; + D3D10_TEXCUBE_SRV TextureCube; + D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray; + } ; +} D3D10_SHADER_RESOURCE_VIEW_DESC1; + +typedef enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS +{ + D3D10_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff, + D3D10_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe +} D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS; + +[object, local, uuid("EDAD8D99-8A35-4d6d-8566-2EA276CDE161")] +interface ID3D10BlendState1 : ID3D10BlendState +{ + void GetDesc1( + [out] D3D10_BLEND_DESC1 *pDesc + ); +}; + +[object, local, uuid("9B7E4C87-342C-4106-A19F-4F2704F689F0")] +interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView +{ + void GetDesc1( + [out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc + ); +}; + +[object, local, uuid("9B7E4C8F-342C-4106-A19F-4F2704F689F0")] +interface ID3D10Device1 : ID3D10Device +{ + HRESULT CreateShaderResourceView1( + [in] ID3D10Resource *pResource, + [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, + [out,optional] ID3D10ShaderResourceView1 **ppSRView + ); + + HRESULT CreateBlendState1( + [in] const D3D10_BLEND_DESC1 *pBlendStateDesc, + [out, optional] ID3D10BlendState1 **ppBlendState + ); + + D3D10_FEATURE_LEVEL1 GetFeatureLevel(); +}; + +//cpp_quote("#include \"d3d10_1shader.h\"") + +typedef enum D3D10_DRIVER_TYPE D3D10_DRIVER_TYPE; + +HRESULT D3D10CreateDevice1( + [in,optional] IDXGIAdapter* pAdapter, + [in] D3D10_DRIVER_TYPE DriverType, + [in] HMODULE Software, + [in] UINT Flags, + [in] D3D10_FEATURE_LEVEL1 HardwareLevel, + [in] UINT SDKVersion, + [out,optional] ID3D10Device1** ppDevice +); + +typedef HRESULT (* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)( + [in,optional] IDXGIAdapter*, + D3D10_DRIVER_TYPE, + HMODULE, + UINT, + D3D10_FEATURE_LEVEL1 HardwareLevels, + UINT, + [in, optional] DXGI_SWAP_CHAIN_DESC*, + [out,optional] IDXGISwapChain**, + [out,optional] ID3D10Device1** +); + +HRESULT D3D10CreateDeviceAndSwapChain1( + [in,optional] IDXGIAdapter* pAdapter, + [in] D3D10_DRIVER_TYPE DriverType, + [in] HMODULE Software, + [in] UINT Flags, + [in] D3D10_FEATURE_LEVEL1 HardwareLevel, + [in] UINT SDKVersion, + [in,optional] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + [out,optional] IDXGISwapChain** ppSwapChain, + [out,optional] ID3D10Device1** ppDevice +); -- cgit v1.2.3 From 6c598c78bd17642d731cf57b8369cc794f64ba2f Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Thu, 23 Sep 2010 13:44:22 +0200 Subject: d3d1x: normalize whitespace --- .../d3d1x/d3d1xshader/include/dxbc.h | 4 +- .../state_trackers/d3d1x/d3d1xshader/include/sm4.h | 2 +- .../d3d1x/d3d1xshader/src/sm4_analyze.cpp | 4 +- .../d3d1x/d3d1xstutil/include/d3d1xstutil.h | 260 ++++----- .../state_trackers/d3d1x/d3dapi/d3d10_1.idl | 18 +- .../state_trackers/d3d1x/d3dapi/d3d10misc.h | 18 +- .../state_trackers/d3d1x/d3dapi/d3d10shader.idl | 24 +- src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl | 628 ++++++++++----------- .../state_trackers/d3d1x/d3dapi/d3d11shader.idl | 36 +- .../state_trackers/d3d1x/d3dapi/d3dcommon.idl | 28 +- src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl | 520 ++++++++--------- .../state_trackers/d3d1x/d3dapi/dxgitype.idl | 68 +-- .../state_trackers/d3d1x/docs/coding_style.txt | 1 - .../state_trackers/d3d1x/dxgi/src/dxgi_loader.cpp | 238 ++++---- .../state_trackers/d3d1x/dxgi/src/dxgi_native.cpp | 356 ++++++------ .../state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp | 24 +- .../state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp | 22 +- src/gallium/state_trackers/d3d1x/gd3d11/d3d11.cpp | 26 +- .../state_trackers/d3d1x/gd3d11/d3d11_context.h | 352 ++++++------ .../state_trackers/d3d1x/gd3d11/d3d11_misc.h | 38 +- .../state_trackers/d3d1x/gd3d11/d3d11_objects.h | 206 +++---- .../state_trackers/d3d1x/gd3d11/d3d11_screen.h | 214 +++---- .../state_trackers/d3d1x/gd3d1x/d3d_enums.cpp | 2 +- .../state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp | 2 +- .../state_trackers/d3d1x/gd3dapi/galliumcom.idl | 2 +- .../state_trackers/d3d1x/gd3dapi/galliumdxgi.idl | 4 +- .../d3d1x/progs/d3d10app/d3d10x11main.cpp | 4 +- .../d3d1x/progs/d3d10tri/d3d10tri.cpp | 28 +- .../state_trackers/d3d1x/progs/d3d11app/d3d11u.h | 2 +- .../d3d1x/progs/d3d11app/d3d11x11main.cpp | 2 +- .../d3d1x/progs/d3d11gears/d3d11gears.cpp | 8 +- .../d3d1x/progs/d3d11tri/d3d11tri.cpp | 28 +- 32 files changed, 1584 insertions(+), 1585 deletions(-) (limited to 'src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl') diff --git a/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h b/src/gallium/state_trackers/d3d1x/d3d1xshader/include/dxbc.h index 06a078af6ec..5c7c87e5e8e 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 #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 07f84f0c73f..c8404d96918 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 848db1bdbbb..7903d547f14 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::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 974518a5ce3..eebabaa9af5 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 * with a pointer to GalliumComObject. - * Since we think that this is a GalliumComObject, we'll look for the + * Since we think that this is a GalliumComObject, 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 } 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 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 lock(private_data_mutex); - std::pair& 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 lock(private_data_mutex); - std::pair& 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 lock(private_data_mutex); + std::pair& 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 lock(private_data_mutex); + std::pair& v = private_data_map[guid]; if(v.first) { if(v.second == ~0u) @@ -923,30 +923,30 @@ struct GalliumPrivateDataComObject : public GalliumComObject 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 @@ -954,27 +954,27 @@ struct GalliumMultiPrivateDataComObject : public GalliumMultiComObjectQueryInterface(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 + * Chia-I Wu */ #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 2149d83a9c6..bf820e9b21b 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 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 struct GalliumDXGIFactory : public GalliumDXGIObject { - HWND associated_window; + HWND associated_window; const struct native_platform* platform; void* display; ComPtr backend; @@ -104,98 +104,98 @@ struct GalliumDXGIFactory : public GalliumDXGIObject GalliumDXGIFactory(const struct native_platform* platform, void* display, IGalliumDXGIBackend* p_backend) : GalliumDXGIObject((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, - IGalliumAdapter> + GalliumDXGIObject, + 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 GalliumDXGIObjectdestroy(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 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 GalliumDXGIObjectformat; 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 dd002261342..3ab8cda191f 100644 --- a/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgid3d10/dxgid3d10.cpp @@ -30,13 +30,13 @@ #include #include -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 86bb24baefd..66f69bb7306 100644 --- a/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp +++ b/src/gallium/state_trackers/d3d1x/dxgid3d11/dxgid3d11.cpp @@ -30,17 +30,17 @@ #include #include -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 46a3905d8fc..3d3990a63ed 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 3c789d3af05..04d5b864967 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 } #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 #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((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(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(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(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 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 } 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 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 #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 } 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 } 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 } virtual void STDMETHODCALLTYPE RSGetState( - __out ID3D11RasterizerState **ppRasterizerState) + __out ID3D11RasterizerState **ppRasterizerState) { SYNCHRONIZED; *ppRasterizerState = rasterizer_state.ref(); @@ -968,8 +968,8 @@ struct GalliumD3D10Device : public GalliumD3D10ScreenImpl } 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 } 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 } 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 } 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 } 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 } 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 } 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 } 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 */ 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 f31b54ba8f3..f5cfd0cfab4 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 b7542fd30e4..0cf2cf3cf7e 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 GalliumPrivateDataComObjectAddRef(); *ppDevice = device; @@ -242,7 +242,7 @@ struct GalliumD3D11ResourceBase : public GalliumD3D11DeviceChild unsigned eviction_priority; virtual void STDMETHODCALLTYPE SetEvictionPriority( - __in unsigned EvictionPriority) + __in unsigned EvictionPriority) { eviction_priority = EvictionPriority; } @@ -257,7 +257,7 @@ template struct GalliumDXGIResource : public IDXGIResource { virtual HRESULT STDMETHODCALLTYPE SetEvictionPriority( - __in unsigned EvictionPriority) + __in unsigned EvictionPriority) { static_cast(this)->eviction_priority = EvictionPriority; return S_OK; @@ -265,13 +265,13 @@ struct GalliumDXGIResource : public IDXGIResource virtual HRESULT STDMETHODCALLTYPE GetEvictionPriority(unsigned* pEvictionPriority) { - *pEvictionPriority = static_cast(this)->eviction_priority; - return S_OK; + *pEvictionPriority = static_cast(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(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(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 : GalliumD3D11Resource(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 GalliumMultiPrivateDataComObjectFormat = this->desc.Format; pDesc->Width = this->desc.Width; @@ -512,8 +512,8 @@ struct GalliumD3D11Surface : public GalliumMultiPrivateDataComObject } 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 {} virtual void STDMETHODCALLTYPE GetDesc( - __out D3D11_QUERY_DESC *pDesc) + __out D3D11_QUERY_DESC *pDesc) { *pDesc = desc; } @@ -708,7 +708,7 @@ struct GalliumD3D11Counter : public GalliumD3D11Asynchronous {} 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 0c8d3ed9433..eea0e21f202 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 7932e438c99..37113a6ec91 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 995059e15b3..4b43a3325ca 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 c42e10cb665..96faf1c0701 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 e6f51472096..92fda3385b9 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 0fcef0d7b69..a8f24ae3031 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 4e92f0a544c..06ad811dec0 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 3b0644a573d..e67fa096060 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 7055da941b7..8eb51d36387 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 32a63ae6dd5..de9946c67e8 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 5622074e19d..30c2ffa5cca 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 -- cgit v1.2.3 From 6b485d85188f7a0499b921fbce4f05f1f5f4882b Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Thu, 23 Sep 2010 13:55:36 +0200 Subject: d3d1x: minifix --- src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl | 2 +- src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl') diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl index 94da622b325..7efcae5f431 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl @@ -171,7 +171,7 @@ typedef HRESULT (* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)( D3D10_DRIVER_TYPE, HMODULE, UINT, - D3D10_FEATURE_LEVEL1 HardwareLevels, + D3D10_FEATURE_LEVEL1, UINT, [in, optional] DXGI_SWAP_CHAIN_DESC*, [out,optional] IDXGISwapChain**, diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl index d916c20f193..e23c2f83527 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl @@ -2467,7 +2467,7 @@ typedef HRESULT (* PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)( HMODULE, UINT, [in,optional] const D3D_FEATURE_LEVEL*, - UINT FeatureLevels, + UINT, UINT, [in, optional] const DXGI_SWAP_CHAIN_DESC*, [out,optional] IDXGISwapChain**, -- cgit v1.2.3 From b6b3fbcdb14faf5a5be66112a06d3406e7a46998 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Thu, 23 Sep 2010 15:45:13 +0200 Subject: d3d11: obliterate IDL parameter names --- .../state_trackers/d3d1x/d3dapi/d3d10_1.idl | 50 +- .../state_trackers/d3d1x/d3dapi/d3d10shader.idl | 34 +- src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl | 948 ++++++++++----------- .../state_trackers/d3d1x/d3dapi/d3d11shader.idl | 62 +- .../state_trackers/d3d1x/d3dapi/d3dcommon.idl | 12 +- src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl | 176 ++-- 6 files changed, 641 insertions(+), 641 deletions(-) (limited to 'src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl') diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl index 7efcae5f431..7edeff94f79 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl @@ -123,7 +123,7 @@ typedef enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS interface ID3D10BlendState1 : ID3D10BlendState { void GetDesc1( - [out] D3D10_BLEND_DESC1 *pDesc + [out] D3D10_BLEND_DESC1 *a ); }; @@ -131,7 +131,7 @@ interface ID3D10BlendState1 : ID3D10BlendState interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView { void GetDesc1( - [out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc + [out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *a ); }; @@ -139,14 +139,14 @@ interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView interface ID3D10Device1 : ID3D10Device { HRESULT CreateShaderResourceView1( - [in] ID3D10Resource *pResource, - [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *pDesc, - [out,optional] ID3D10ShaderResourceView1 **ppSRView + [in] ID3D10Resource *a, + [in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *b, + [out,optional] ID3D10ShaderResourceView1 **c ); HRESULT CreateBlendState1( - [in] const D3D10_BLEND_DESC1 *pBlendStateDesc, - [out, optional] ID3D10BlendState1 **ppBlendState + [in] const D3D10_BLEND_DESC1 *a, + [out, optional] ID3D10BlendState1 **b ); D3D10_FEATURE_LEVEL1 GetFeatureLevel(); @@ -157,35 +157,35 @@ interface ID3D10Device1 : ID3D10Device typedef enum D3D10_DRIVER_TYPE D3D10_DRIVER_TYPE; HRESULT D3D10CreateDevice1( - [in,optional] IDXGIAdapter* pAdapter, - [in] D3D10_DRIVER_TYPE DriverType, - [in] HMODULE Software, - [in] UINT Flags, - [in] D3D10_FEATURE_LEVEL1 HardwareLevel, - [in] UINT SDKVersion, - [out,optional] ID3D10Device1** ppDevice + [in,optional] IDXGIAdapter* a, + [in] D3D10_DRIVER_TYPE b, + [in] HMODULE c, + [in] UINT d, + [in] D3D10_FEATURE_LEVEL1 e, + [in] UINT f, + [out,optional] ID3D10Device1** g ); typedef HRESULT (* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)( - [in,optional] IDXGIAdapter*, + [in,optional] IDXGIAdapter*, D3D10_DRIVER_TYPE, HMODULE, UINT, D3D10_FEATURE_LEVEL1, UINT, - [in, optional] DXGI_SWAP_CHAIN_DESC*, + [in, optional] DXGI_SWAP_CHAIN_DESC*, [out,optional] IDXGISwapChain**, [out,optional] ID3D10Device1** ); HRESULT D3D10CreateDeviceAndSwapChain1( - [in,optional] IDXGIAdapter* pAdapter, - [in] D3D10_DRIVER_TYPE DriverType, - [in] HMODULE Software, - [in] UINT Flags, - [in] D3D10_FEATURE_LEVEL1 HardwareLevel, - [in] UINT SDKVersion, - [in,optional] DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, - [out,optional] IDXGISwapChain** ppSwapChain, - [out,optional] ID3D10Device1** ppDevice + [in,optional] IDXGIAdapter* a, + [in] D3D10_DRIVER_TYPE b, + [in] HMODULE c, + [in] UINT d, + [in] D3D10_FEATURE_LEVEL1 e, + [in] UINT f, + [in,optional] DXGI_SWAP_CHAIN_DESC* g, + [out,optional] IDXGISwapChain** h, + [out,optional] ID3D10Device1** i ); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl index d3f8b75db85..6088a8894a2 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d10shader.idl @@ -178,19 +178,19 @@ typedef struct _D3D10_SHADER_INPUT_BIND_DESC interface ID3D10ShaderReflectionType { HRESULT GetDesc( - [out] D3D10_SHADER_TYPE_DESC *pDesc + [out] D3D10_SHADER_TYPE_DESC *a ); ID3D10ShaderReflectionType* GetMemberTypeByIndex( - [in] UINT Index + [in] UINT a ); ID3D10ShaderReflectionType* GetMemberTypeByName( - [in] LPCSTR Name + [in] LPCSTR a ); LPCSTR GetMemberTypeName( - [in] UINT Index + [in] UINT a ); }; @@ -200,7 +200,7 @@ interface ID3D10ShaderReflectionConstantBuffer; interface ID3D10ShaderReflectionVariable { HRESULT GetDesc( - [out] D3D10_SHADER_VARIABLE_DESC *pDesc + [out] D3D10_SHADER_VARIABLE_DESC *a ); ID3D10ShaderReflectionType* GetType(); @@ -210,15 +210,15 @@ interface ID3D10ShaderReflectionVariable interface ID3D10ShaderReflectionConstantBuffer { HRESULT GetDesc( - [out] D3D10_SHADER_BUFFER_DESC *pDesc + [out] D3D10_SHADER_BUFFER_DESC *a ); ID3D10ShaderReflectionVariable* GetVariableByIndex( - [in] UINT Index + [in] UINT a ); ID3D10ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR a ); }; @@ -226,31 +226,31 @@ interface ID3D10ShaderReflectionConstantBuffer interface ID3D10ShaderReflection : IUnknown { HRESULT GetDesc( - [out] D3D10_SHADER_DESC *pDesc + [out] D3D10_SHADER_DESC *a ); ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByIndex( - [in] UINT Index + [in] UINT a ); ID3D10ShaderReflectionConstantBuffer* GetConstantBufferByName( - [in] LPCSTR Name + [in] LPCSTR a ); HRESULT GetResourceBindingDesc( - [in] UINT ResourceIndex, - [out] D3D10_SHADER_INPUT_BIND_DESC *pDesc + [in] UINT a, + [out] D3D10_SHADER_INPUT_BIND_DESC *b ); HRESULT GetInputParameterDesc( - [in] UINT ParameterIndex, - [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc + [in] UINT a, + [out] D3D10_SIGNATURE_PARAMETER_DESC *b ); HRESULT GetOutputParameterDesc ( - [in] UINT ParameterIndex, - [out] D3D10_SIGNATURE_PARAMETER_DESC *pDesc + [in] UINT a, + [out] D3D10_SIGNATURE_PARAMETER_DESC *b ); }; diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl index e23c2f83527..cac046fac77 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11.idl @@ -1335,24 +1335,24 @@ interface ID3D11Device; [object, local, uuid("1841e5c8-16b0-489b-bcc8-44cfb0d5deae")] interface ID3D11DeviceChild : IUnknown { void GetDevice( - [out] ID3D11Device **ppDevice + [out] ID3D11Device **a ); HRESULT GetPrivateData( - [in] REFGUID guid, - [in, out] UINT *pDataSize, - [out] void *pData + [in] REFGUID a, + [in, out] UINT *b, + [out] void *c ); HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT DataSize, - [in] const void *pData + [in] REFGUID a, + [in] UINT b, + [in] const void *c ); HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *pData + [in] REFGUID a, + [in] const IUnknown *b ); }; @@ -1364,21 +1364,21 @@ interface ID3D11InputLayout : ID3D11DeviceChild [object, local, uuid("03823efb-8d8f-4e1c-9aa2-f64bb2cbfdf1")] interface ID3D11DepthStencilState : ID3D11DeviceChild { void GetDesc( - [out] D3D11_DEPTH_STENCIL_DESC *pDesc + [out] D3D11_DEPTH_STENCIL_DESC *a ); }; [object, local, uuid("75b68faa-347d-4159-8f45-a0640f01cd9a")] interface ID3D11BlendState : ID3D11DeviceChild { void GetDesc( - [out] D3D11_BLEND_DESC *pDesc + [out] D3D11_BLEND_DESC *a ); }; [object, local, uuid("9bb4ab81-ab1a-4d8f-b506-fc04200b6ee7")] interface ID3D11RasterizerState : ID3D11DeviceChild { void GetDesc( - [out] D3D11_RASTERIZER_DESC *pDesc + [out] D3D11_RASTERIZER_DESC *a ); }; @@ -1386,7 +1386,7 @@ interface ID3D11RasterizerState : ID3D11DeviceChild { interface ID3D11SamplerState : ID3D11DeviceChild { void GetDesc( - [out] D3D11_SAMPLER_DESC *pDesc + [out] D3D11_SAMPLER_DESC *a ); }; @@ -1394,11 +1394,11 @@ interface ID3D11SamplerState : ID3D11DeviceChild [object, local, uuid("dc8e63f3-d12b-4952-b47b-5e45026a862d")] interface ID3D11Resource : ID3D11DeviceChild { void GetType( - [out] D3D11_RESOURCE_DIMENSION *pResourceDimension + [out] D3D11_RESOURCE_DIMENSION *a ); void SetEvictionPriority( - [in] UINT EvictionPriority + [in] UINT a ); UINT GetEvictionPriority( @@ -1408,7 +1408,7 @@ interface ID3D11Resource : ID3D11DeviceChild { [object, local, uuid("48570b85-d1ee-4fcd-a250-eb350722b037")] interface ID3D11Buffer : ID3D11Resource { void GetDesc( - [out] D3D11_BUFFER_DESC *pDesc + [out] D3D11_BUFFER_DESC *a ); }; @@ -1416,28 +1416,28 @@ interface ID3D11Buffer : ID3D11Resource { [object, local, uuid("f8fb5c27-c6b3-4f75-a4c8-439af2ef564c")] interface ID3D11Texture1D : ID3D11Resource { void GetDesc( - [out] D3D11_TEXTURE1D_DESC *pDesc + [out] D3D11_TEXTURE1D_DESC *a ); }; [object, local, uuid("6f15aaf2-d208-4e89-9ab4-489535d34f9c")] interface ID3D11Texture2D : ID3D11Resource { void GetDesc( - [out] D3D11_TEXTURE2D_DESC *pDesc + [out] D3D11_TEXTURE2D_DESC *a ); }; [object, local, uuid("037e866e-f56d-4357-a8af-9dabbe6e250e")] interface ID3D11Texture3D : ID3D11Resource { void GetDesc( - [out] D3D11_TEXTURE3D_DESC *pDesc + [out] D3D11_TEXTURE3D_DESC *a ); }; [object, local, uuid("839d1216-bb2e-412b-b7f4-a9dbebe08ed1")] interface ID3D11View : ID3D11DeviceChild { void GetResource( - [out] ID3D11Resource **ppResource + [out] ID3D11Resource **a ); }; @@ -1445,7 +1445,7 @@ interface ID3D11View : ID3D11DeviceChild { [object, local, uuid("b0e06fe0-8192-4e1a-b1ca-36d7414710b2")] interface ID3D11ShaderResourceView : ID3D11View { void GetDesc( - [out] D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc + [out] D3D11_SHADER_RESOURCE_VIEW_DESC *a ); }; @@ -1453,7 +1453,7 @@ interface ID3D11ShaderResourceView : ID3D11View { interface ID3D11RenderTargetView : ID3D11View { void GetDesc( - [out] D3D11_RENDER_TARGET_VIEW_DESC *pDesc + [out] D3D11_RENDER_TARGET_VIEW_DESC *a ); }; @@ -1461,7 +1461,7 @@ interface ID3D11RenderTargetView : ID3D11View interface ID3D11DepthStencilView : ID3D11View { void GetDesc( - [out] D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc + [out] D3D11_DEPTH_STENCIL_VIEW_DESC *a ); }; @@ -1469,7 +1469,7 @@ interface ID3D11DepthStencilView : ID3D11View interface ID3D11UnorderedAccessView : ID3D11View { void GetDesc( - [out] D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc + [out] D3D11_UNORDERED_ACCESS_VIEW_DESC *a ); }; @@ -1514,7 +1514,7 @@ interface ID3D11Asynchronous : ID3D11DeviceChild interface ID3D11Query : ID3D11Asynchronous { void GetDesc( - [out] D3D11_QUERY_DESC *pDesc + [out] D3D11_QUERY_DESC *a ); }; @@ -1527,7 +1527,7 @@ interface ID3D11Predicate : ID3D11Query interface ID3D11Counter : ID3D11Asynchronous { void GetDesc( - [out] D3D11_COUNTER_DESC *pDesc + [out] D3D11_COUNTER_DESC *a ); }; @@ -1537,21 +1537,21 @@ interface ID3D11ClassLinkage; interface ID3D11ClassInstance : ID3D11DeviceChild { void GetClassLinkage( - [out] ID3D11ClassLinkage **ppLinkage + [out] ID3D11ClassLinkage **a ); void GetDesc( - [out] D3D11_CLASS_INSTANCE_DESC *pDesc + [out] D3D11_CLASS_INSTANCE_DESC *a ); void GetInstanceName( - [out] LPSTR pInstanceName, - [in, out] SIZE_T *pBufferLength + [out] LPSTR a, + [in, out] SIZE_T *b ); void GetTypeName( - [out] LPSTR pTypeName, - [in, out] SIZE_T *pBufferLength + [out] LPSTR a, + [in, out] SIZE_T *b ); }; @@ -1559,18 +1559,18 @@ interface ID3D11ClassInstance : ID3D11DeviceChild interface ID3D11ClassLinkage : ID3D11DeviceChild { HRESULT GetClassInstance( - [in] LPCSTR pClassInstanceName, - [in] UINT InstanceIndex, - [out] ID3D11ClassInstance **ppInstance + [in] LPCSTR a, + [in] UINT b, + [out] ID3D11ClassInstance **c ); HRESULT CreateClassInstance( - [in] LPCSTR pClassTypeName, - [in] UINT ConstantBufferOffset, - [in] UINT ConstantVectorOffset, - [in] UINT TextureOffset, - [in] UINT SamplerOffset, - [out] ID3D11ClassInstance **ppInstance + [in] LPCSTR a, + [in] UINT b, + [in] UINT c, + [in] UINT d, + [in] UINT e, + [out] ID3D11ClassInstance **f ); }; @@ -1586,213 +1586,213 @@ interface ID3D11DeviceContext; interface ID3D11Device : IUnknown { HRESULT CreateBuffer( - [in] const D3D11_BUFFER_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, - [out] ID3D11Buffer **ppBuffer + [in] const D3D11_BUFFER_DESC *a, + [in] const D3D11_SUBRESOURCE_DATA *b, + [out] ID3D11Buffer **c ); HRESULT CreateTexture1D( - [in] const D3D11_TEXTURE1D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, - [out] ID3D11Texture1D **ppTexture1D + [in] const D3D11_TEXTURE1D_DESC *a, + [in] const D3D11_SUBRESOURCE_DATA *b, + [out] ID3D11Texture1D **c ); HRESULT CreateTexture2D( - [in] const D3D11_TEXTURE2D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, - [out] ID3D11Texture2D **ppTexture2D + [in] const D3D11_TEXTURE2D_DESC *a, + [in] const D3D11_SUBRESOURCE_DATA *b, + [out] ID3D11Texture2D **c ); HRESULT CreateTexture3D( - [in] const D3D11_TEXTURE3D_DESC *pDesc, - [in] const D3D11_SUBRESOURCE_DATA *pInitialData, - [out] ID3D11Texture3D **ppTexture3D + [in] const D3D11_TEXTURE3D_DESC *a, + [in] const D3D11_SUBRESOURCE_DATA *b, + [out] ID3D11Texture3D **c ); HRESULT CreateShaderResourceView( - [in] ID3D11Resource *pResource, - [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *pDesc, - [out] ID3D11ShaderResourceView **ppSRView + [in] ID3D11Resource *a, + [in] const D3D11_SHADER_RESOURCE_VIEW_DESC *b, + [out] ID3D11ShaderResourceView **c ); HRESULT CreateUnorderedAccessView( - [in] ID3D11Resource *pResource, - [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *pDesc, - [out] ID3D11UnorderedAccessView **ppUAView + [in] ID3D11Resource *a, + [in] const D3D11_UNORDERED_ACCESS_VIEW_DESC *b, + [out] ID3D11UnorderedAccessView **c ); HRESULT CreateRenderTargetView( - [in] ID3D11Resource *pResource, - [in] const D3D11_RENDER_TARGET_VIEW_DESC *pDesc, - [out] ID3D11RenderTargetView **ppRTView + [in] ID3D11Resource *a, + [in] const D3D11_RENDER_TARGET_VIEW_DESC *b, + [out] ID3D11RenderTargetView **c ); HRESULT CreateDepthStencilView( - [in] ID3D11Resource *pResource, - [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *pDesc, - [out] ID3D11DepthStencilView **ppDepthStencilView + [in] ID3D11Resource *a, + [in] const D3D11_DEPTH_STENCIL_VIEW_DESC *b, + [out] ID3D11DepthStencilView **c ); HRESULT CreateInputLayout( - [in] const D3D11_INPUT_ELEMENT_DESC *pInputElementDescs, - [in] UINT NumElements, - [in] const void *pShaderBytecodeWithInputSignature, - [in] SIZE_T BytecodeLength, - [out] ID3D11InputLayout **ppInputLayout + [in] const D3D11_INPUT_ELEMENT_DESC *a, + [in] UINT b, + [in] const void *c, + [in] SIZE_T d, + [out] ID3D11InputLayout **e ); HRESULT CreateVertexShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11VertexShader **ppVertexShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11VertexShader **d ); HRESULT CreateGeometryShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11GeometryShader **ppGeometryShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11GeometryShader **d ); 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, - [out] ID3D11GeometryShader **ppGeometryShader + [in] const void *a, + [in] SIZE_T b, + [in] const D3D11_SO_DECLARATION_ENTRY *c, + [in] UINT d, + [in] const UINT *e, + [in] UINT f, + [in] UINT g, + [in] ID3D11ClassLinkage *h, + [out] ID3D11GeometryShader **i ); HRESULT CreatePixelShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11PixelShader **ppPixelShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11PixelShader **d ); HRESULT CreateHullShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11HullShader **ppHullShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11HullShader **d ); HRESULT CreateDomainShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11DomainShader **ppDomainShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11DomainShader **d ); HRESULT CreateComputeShader( - [in] const void *pShaderBytecode, - [in] SIZE_T BytecodeLength, - [in] ID3D11ClassLinkage *pClassLinkage, - [out] ID3D11ComputeShader **ppComputeShader + [in] const void *a, + [in] SIZE_T b, + [in] ID3D11ClassLinkage *c, + [out] ID3D11ComputeShader **d ); HRESULT CreateClassLinkage( - [out] ID3D11ClassLinkage **ppLinkage + [out] ID3D11ClassLinkage **a ); HRESULT CreateBlendState( - [in] const D3D11_BLEND_DESC *pBlendStateDesc, - [out] ID3D11BlendState **ppBlendState + [in] const D3D11_BLEND_DESC *a, + [out] ID3D11BlendState **b ); HRESULT CreateDepthStencilState( - [in] const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc, - [out] ID3D11DepthStencilState **ppDepthStencilState + [in] const D3D11_DEPTH_STENCIL_DESC *a, + [out] ID3D11DepthStencilState **b ); HRESULT CreateRasterizerState( - [in] const D3D11_RASTERIZER_DESC *pRasterizerDesc, - [out] ID3D11RasterizerState **ppRasterizerState + [in] const D3D11_RASTERIZER_DESC *a, + [out] ID3D11RasterizerState **b ); HRESULT CreateSamplerState( - [in] const D3D11_SAMPLER_DESC *pSamplerDesc, - [out] ID3D11SamplerState **ppSamplerState + [in] const D3D11_SAMPLER_DESC *a, + [out] ID3D11SamplerState **b ); HRESULT CreateQuery( - [in] const D3D11_QUERY_DESC *pQueryDesc, - [out] ID3D11Query **ppQuery + [in] const D3D11_QUERY_DESC *a, + [out] ID3D11Query **b ); HRESULT CreatePredicate( - [in] const D3D11_QUERY_DESC *pPredicateDesc, - [out] ID3D11Predicate **ppPredicate + [in] const D3D11_QUERY_DESC *a, + [out] ID3D11Predicate **b ); HRESULT CreateCounter( - [in] const D3D11_COUNTER_DESC *pCounterDesc, - [out] ID3D11Counter **ppCounter + [in] const D3D11_COUNTER_DESC *a, + [out] ID3D11Counter **b ); HRESULT CreateDeferredContext( - [in] UINT ContextFlags, - [out] ID3D11DeviceContext **ppDeferredContext + [in] UINT a, + [out] ID3D11DeviceContext **b ); HRESULT OpenSharedResource( - [in] HANDLE hResource, - [in] REFIID ReturnedInterface, - [out] void **ppResource + [in] HANDLE a, + [in] REFIID b, + [out] void **c ); HRESULT CheckFormatSupport( - [in] DXGI_FORMAT Format, - [out] UINT *pFormatSupport + [in] DXGI_FORMAT a, + [out] UINT *b ); HRESULT CheckMultisampleQualityLevels( - [in] DXGI_FORMAT Format, - [in] UINT SampleCount, - [out] UINT *pNumQualityLevels + [in] DXGI_FORMAT a, + [in] UINT b, + [out] UINT *c ); void CheckCounterInfo( - [out] D3D11_COUNTER_INFO *pCounterInfo + [out] D3D11_COUNTER_INFO *a ); HRESULT CheckCounter( - [in] const D3D11_COUNTER_DESC *pDesc, - [out] D3D11_COUNTER_TYPE *pType, - [out] UINT *pActiveCounters, - [out] LPSTR szName, - [in, out, optional] UINT *pNameLength, - [out] LPSTR szUnits, - [in, out, optional] UINT *pUnitsLength, - [out] LPSTR szDescription, - [in, out, optional] UINT *pDescriptionLength + [in] const D3D11_COUNTER_DESC *a, + [out] D3D11_COUNTER_TYPE *b, + [out] UINT *c, + [out] LPSTR d, + [in, out, optional] UINT *e, + [out] LPSTR f, + [in, out, optional] UINT *g, + [out] LPSTR h, + [in, out, optional] UINT *i ); HRESULT CheckFeatureSupport( - [in] D3D11_FEATURE Feature, - [out] void *pFeatureSupportData, - [in] UINT FeatureSupportDataSize + [in] D3D11_FEATURE a, + [out] void *b, + [in] UINT c ); HRESULT GetPrivateData( - [in] REFGUID guid, - [in, out] UINT *pDataSize, - [out] void *pData + [in] REFGUID a, + [in, out] UINT *b, + [out] void *c ); HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT DataSize, - [in] const void *pData + [in] REFGUID a, + [in] UINT b, + [in] const void *c ); HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *pData + [in] REFGUID a, + [in] const IUnknown *b ); D3D_FEATURE_LEVEL GetFeatureLevel(); @@ -1802,11 +1802,11 @@ interface ID3D11Device : IUnknown HRESULT GetDeviceRemovedReason(); void GetImmediateContext( - [out] ID3D11DeviceContext **ppImmediateContext + [out] ID3D11DeviceContext **a ); HRESULT SetExceptionMode( - [in] UINT RaiseFlags + [in] UINT a ); UINT GetExceptionMode(); @@ -1816,607 +1816,607 @@ interface ID3D11Device : IUnknown interface ID3D11DeviceContext : ID3D11DeviceChild { void VSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void PSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void PSSetShader( - [in] ID3D11PixelShader *pPixelShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11PixelShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void PSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void VSSetShader( - [in] ID3D11VertexShader *pVertexShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11VertexShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void DrawIndexed( - [in] UINT IndexCount, - [in] UINT StartIndexLocation, - [in] INT BaseVertexLocation + [in] UINT a, + [in] UINT b, + [in] INT c ); void Draw( - [in] UINT VertexCount, - [in] UINT StartVertexLocation + [in] UINT a, + [in] UINT b ); HRESULT Map( - [in] ID3D11Resource *pResource, - [in] UINT Subresource, - [in] D3D11_MAP MapType, - [in] UINT MapFlags, - [out] D3D11_MAPPED_SUBRESOURCE *pMappedResource + [in] ID3D11Resource *a, + [in] UINT b, + [in] D3D11_MAP c, + [in] UINT d, + [out] D3D11_MAPPED_SUBRESOURCE *e ); void Unmap( - [in] ID3D11Resource *pResource, - [in] UINT Subresource + [in] ID3D11Resource *a, + [in] UINT b ); void PSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void IASetInputLayout( - [in] ID3D11InputLayout *pInputLayout + [in] ID3D11InputLayout *a ); void IASetVertexBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppVertexBuffers, - [in] const UINT *pStrides, - [in] const UINT *pOffsets + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c, + [in] const UINT *d, + [in] const UINT *e ); void IASetIndexBuffer( - [in] ID3D11Buffer *pIndexBuffer, - [in] DXGI_FORMAT Format, - [in] UINT Offset + [in] ID3D11Buffer *a, + [in] DXGI_FORMAT b, + [in] UINT c ); void DrawIndexedInstanced( - [in] UINT IndexCountPerInstance, - [in] UINT InstanceCount, - [in] UINT StartIndexLocation, - [in] INT BaseVertexLocation, - [in] UINT StartInstanceLocation + [in] UINT a, + [in] UINT b, + [in] UINT c, + [in] INT d, + [in] UINT e ); void DrawInstanced( - [in] UINT VertexCountPerInstance, - [in] UINT InstanceCount, - [in] UINT StartVertexLocation, - [in] UINT StartInstanceLocation + [in] UINT a, + [in] UINT b, + [in] UINT c, + [in] UINT d ); void GSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void GSSetShader( - [in] ID3D11GeometryShader *pShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11GeometryShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void IASetPrimitiveTopology( - [in] D3D11_PRIMITIVE_TOPOLOGY Topology + [in] D3D11_PRIMITIVE_TOPOLOGY a ); void VSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void VSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void Begin( - [in] ID3D11Asynchronous *pAsync + [in] ID3D11Asynchronous *a ); void End( - [in] ID3D11Asynchronous *pAsync + [in] ID3D11Asynchronous *a ); HRESULT GetData( - [in] ID3D11Asynchronous *pAsync, - [out] void *pData, - [in] UINT DataSize, - [in] UINT GetDataFlags + [in] ID3D11Asynchronous *a, + [out] void *b, + [in] UINT c, + [in] UINT d ); void SetPredication( - [in] ID3D11Predicate *pPredicate, - [in] BOOL PredicateValue + [in] ID3D11Predicate *a, + [in] BOOL b ); void GSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void GSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void OMSetRenderTargets( - [in] UINT NumViews, - [in] ID3D11RenderTargetView *const *ppRenderTargetViews, - [in] ID3D11DepthStencilView *pDepthStencilView + [in] UINT a, + [in] ID3D11RenderTargetView *const *b, + [in] ID3D11DepthStencilView *c ); 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 a, + [in] ID3D11RenderTargetView *const *b, + [in] ID3D11DepthStencilView *c, + [in] UINT d, + [in] UINT e, + [in] ID3D11UnorderedAccessView *const *f, + [in] const UINT *g ); void OMSetBlendState( - [in] ID3D11BlendState *pBlendState, - [in] const FLOAT BlendFactor[ 4 ], - [in] UINT SampleMask + [in] ID3D11BlendState *a, + [in] const FLOAT b[4], + [in] UINT c ); void OMSetDepthStencilState( - [in] ID3D11DepthStencilState *pDepthStencilState, - [in] UINT StencilRef + [in] ID3D11DepthStencilState *a, + [in] UINT b ); void SOSetTargets( - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppSOTargets, - [in] const UINT *pOffsets + [in] UINT a, + [in] ID3D11Buffer *const *b, + [in] const UINT *c ); void DrawAuto( ); void DrawIndexedInstancedIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *a, + [in] UINT b ); void DrawInstancedIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *a, + [in] UINT b ); void Dispatch( - [in] UINT ThreadGroupCountX, - [in] UINT ThreadGroupCountY, - [in] UINT ThreadGroupCountZ + [in] UINT a, + [in] UINT b, + [in] UINT c ); void DispatchIndirect( - [in] ID3D11Buffer *pBufferForArgs, - [in] UINT AlignedByteOffsetForArgs + [in] ID3D11Buffer *a, + [in] UINT b ); void RSSetState( - [in] ID3D11RasterizerState *pRasterizerState + [in] ID3D11RasterizerState *a ); void RSSetViewports( - [in] UINT NumViewports, - [in] const D3D11_VIEWPORT *pViewports + [in] UINT a, + [in] const D3D11_VIEWPORT *b ); void RSSetScissorRects( - [in] UINT NumRects, - [in] const D3D11_RECT *pRects + [in] UINT a, + [in] const D3D11_RECT *b ); 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 *a, + [in] UINT b, + [in] UINT c, + [in] UINT d, + [in] UINT e, + [in] ID3D11Resource *f, + [in] UINT g, + [in] const D3D11_BOX *h ); void CopyResource( - [in] ID3D11Resource *pDstResource, - [in] ID3D11Resource *pSrcResource + [in] ID3D11Resource *a, + [in] ID3D11Resource *b ); 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 *a, + [in] UINT b, + [in] const D3D11_BOX *c, + [in] const void *d, + [in] UINT e, + [in] UINT f ); void CopyStructureCount( - [in] ID3D11Buffer *pDstBuffer, - [in] UINT DstAlignedByteOffset, - [in] ID3D11UnorderedAccessView *pSrcView + [in] ID3D11Buffer *a, + [in] UINT b, + [in] ID3D11UnorderedAccessView *c ); void ClearRenderTargetView( - [in] ID3D11RenderTargetView *pRenderTargetView, - [in] const FLOAT ColorRGBA[ 4 ] + [in] ID3D11RenderTargetView *a, + [in] const FLOAT b[4] ); void ClearUnorderedAccessViewUint( - [in] ID3D11UnorderedAccessView *pUnorderedAccessView, - [in] const UINT Values[ 4 ] + [in] ID3D11UnorderedAccessView *a, + [in] const UINT b[4] ); void ClearUnorderedAccessViewFloat( - [in] ID3D11UnorderedAccessView *pUnorderedAccessView, - [in] const FLOAT Values[ 4 ] + [in] ID3D11UnorderedAccessView *a, + [in] const FLOAT b[4] ); void ClearDepthStencilView( - [in] ID3D11DepthStencilView *pDepthStencilView, - [in] UINT ClearFlags, - [in] FLOAT Depth, - [in] UINT8 Stencil + [in] ID3D11DepthStencilView *a, + [in] UINT b, + [in] FLOAT c, + [in] UINT8 d ); void GenerateMips( - [in] ID3D11ShaderResourceView *pShaderResourceView + [in] ID3D11ShaderResourceView *a ); void SetResourceMinLOD( - [in] ID3D11Resource *pResource, - [in] FLOAT MinLOD + [in] ID3D11Resource *a, + [in] FLOAT b ); FLOAT GetResourceMinLOD( - [in] ID3D11Resource *pResource + [in] ID3D11Resource *a ); void ResolveSubresource( - [in] ID3D11Resource *pDstResource, - [in] UINT DstSubresource, - [in] ID3D11Resource *pSrcResource, - [in] UINT SrcSubresource, - [in] DXGI_FORMAT Format + [in] ID3D11Resource *a, + [in] UINT b, + [in] ID3D11Resource *c, + [in] UINT d, + [in] DXGI_FORMAT e ); void ExecuteCommandList( - [in] ID3D11CommandList *pCommandList, - [in] BOOL RestoreContextState + [in] ID3D11CommandList *a, + [in] BOOL b ); void HSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void HSSetShader( - [in] ID3D11HullShader *pHullShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11HullShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void HSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void HSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void DSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void DSSetShader( - [in] ID3D11DomainShader *pDomainShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11DomainShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void DSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void DSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void CSSetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [in] ID3D11ShaderResourceView *const *ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [in] ID3D11ShaderResourceView *const *c ); void CSSetUnorderedAccessViews( - [in] UINT StartSlot, - [in] UINT NumUAVs, - [in] ID3D11UnorderedAccessView *const *ppUnorderedAccessViews, - [in] const UINT *pUAVInitialCounts + [in] UINT a, + [in] UINT b, + [in] ID3D11UnorderedAccessView *const *c, + [in] const UINT *d ); void CSSetShader( - [in] ID3D11ComputeShader *pComputeShader, - [in] ID3D11ClassInstance *const *ppClassInstances, - [in] UINT NumClassInstances + [in] ID3D11ComputeShader *a, + [in] ID3D11ClassInstance *const *b, + [in] UINT c ); void CSSetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [in] ID3D11SamplerState *const *ppSamplers + [in] UINT a, + [in] UINT b, + [in] ID3D11SamplerState *const *c ); void CSSetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [in] ID3D11Buffer *const *ppConstantBuffers + [in] UINT a, + [in] UINT b, + [in] ID3D11Buffer *const *c ); void VSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void PSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void PSGetShader( - [out] ID3D11PixelShader **ppPixelShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11PixelShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void PSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void VSGetShader( - [out] ID3D11VertexShader **ppVertexShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11VertexShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void PSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void IAGetInputLayout( - [out] ID3D11InputLayout **ppInputLayout + [out] ID3D11InputLayout **a ); void IAGetVertexBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppVertexBuffers, - [out] UINT *pStrides, - [out] UINT *pOffsets + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c, + [out] UINT *d, + [out] UINT *e ); void IAGetIndexBuffer( - [out] ID3D11Buffer **pIndexBuffer, - [out] DXGI_FORMAT *Format, - [out] UINT *Offset + [out] ID3D11Buffer **a, + [out] DXGI_FORMAT *b, + [out] UINT *c ); void GSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void GSGetShader( - [out] ID3D11GeometryShader **ppGeometryShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11GeometryShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void IAGetPrimitiveTopology( - [out] D3D11_PRIMITIVE_TOPOLOGY *pTopology + [out] D3D11_PRIMITIVE_TOPOLOGY *a ); void VSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void VSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void GetPredication( - [out] ID3D11Predicate **ppPredicate, - [out] BOOL *pPredicateValue + [out] ID3D11Predicate **a, + [out] BOOL *b ); void GSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void GSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void OMGetRenderTargets( - [in] UINT NumViews, - [out] ID3D11RenderTargetView **ppRenderTargetViews, - [out] ID3D11DepthStencilView **ppDepthStencilView + [in] UINT a, + [out] ID3D11RenderTargetView **b, + [out] ID3D11DepthStencilView **c ); void OMGetRenderTargetsAndUnorderedAccessViews( - [in] UINT NumRTVs, - [out] ID3D11RenderTargetView **ppRenderTargetViews, - [out] ID3D11DepthStencilView **ppDepthStencilView, - [in] UINT UAVStartSlot, - [in] UINT NumUAVs, - [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews + [in] UINT a, + [out] ID3D11RenderTargetView **b, + [out] ID3D11DepthStencilView **c, + [in] UINT d, + [in] UINT e, + [out] ID3D11UnorderedAccessView **f ); void OMGetBlendState( - [out] ID3D11BlendState **ppBlendState, - [out] FLOAT BlendFactor[ 4 ], - [out] UINT *pSampleMask + [out] ID3D11BlendState **a, + [out] FLOAT b[4], + [out] UINT *c ); void OMGetDepthStencilState( - [out] ID3D11DepthStencilState **ppDepthStencilState, - [out] UINT *pStencilRef + [out] ID3D11DepthStencilState **a, + [out] UINT *b ); void SOGetTargets( - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppSOTargets + [in] UINT a, + [out] ID3D11Buffer **b ); void RSGetState( - [out] ID3D11RasterizerState **ppRasterizerState + [out] ID3D11RasterizerState **a ); void RSGetViewports( - [in, out] /*_range*/ UINT *pNumViewports, - [out] D3D11_VIEWPORT *pViewports + [in, out] UINT *a, + [out] D3D11_VIEWPORT *b ); void RSGetScissorRects( - [in, out] /*_range*/ UINT *pNumRects, - [out] D3D11_RECT *pRects + [in, out] UINT *a, + [out] D3D11_RECT *b ); void HSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void HSGetShader( - [out] ID3D11HullShader **ppHullShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11HullShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void HSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void HSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void DSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void DSGetShader( - [out] ID3D11DomainShader **ppDomainShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11DomainShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void DSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void DSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void CSGetShaderResources( - [in] UINT StartSlot, - [in] UINT NumViews, - [out] ID3D11ShaderResourceView **ppShaderResourceViews + [in] UINT a, + [in] UINT b, + [out] ID3D11ShaderResourceView **c ); void CSGetUnorderedAccessViews( - [in] UINT StartSlot, - [in] UINT NumUAVs, - [out] ID3D11UnorderedAccessView **ppUnorderedAccessViews + [in] UINT a, + [in] UINT b, + [out] ID3D11UnorderedAccessView **c ); void CSGetShader( - [out] ID3D11ComputeShader **ppComputeShader, - [out] ID3D11ClassInstance **ppClassInstances, - [in, out, optional] UINT *pNumClassInstances + [out] ID3D11ComputeShader **a, + [out] ID3D11ClassInstance **b, + [in, out, optional] UINT *c ); void CSGetSamplers( - [in] UINT StartSlot, - [in] UINT NumSamplers, - [out] ID3D11SamplerState **ppSamplers + [in] UINT a, + [in] UINT b, + [out] ID3D11SamplerState **c ); void CSGetConstantBuffers( - [in] UINT StartSlot, - [in] UINT NumBuffers, - [out] ID3D11Buffer **ppConstantBuffers + [in] UINT a, + [in] UINT b, + [out] ID3D11Buffer **c ); void ClearState(); @@ -2428,8 +2428,8 @@ interface ID3D11DeviceContext : ID3D11DeviceChild UINT GetContextFlags(); HRESULT FinishCommandList( - [in] BOOL RestoreDeferredContextState, - [out] ID3D11CommandList **ppCommandList + [in] BOOL a, + [out] ID3D11CommandList **b ); }; @@ -2449,44 +2449,44 @@ typedef enum D3D11_CREATE_DEVICE_FLAG HRESULT D3D11CreateDevice( - [in,optional] IDXGIAdapter* pAdapter, - [in] D3D_DRIVER_TYPE DriverType, - [in] HMODULE Software, - [in] UINT Flags, - [in,optional] const D3D_FEATURE_LEVEL* pFeatureLevels, - [in] UINT FeatureLevels, - [in] UINT SDKVersion, - [out,optional] ID3D11Device** ppDevice, - [out,optional] D3D_FEATURE_LEVEL* pFeatureLevel, - [out,optional] ID3D11DeviceContext** ppImmediateContext + [in,optional] IDXGIAdapter* a, + [in] D3D_DRIVER_TYPE b, + [in] HMODULE c, + [in] UINT d, + [in,optional] const D3D_FEATURE_LEVEL* e, + [in] UINT f, + [in] UINT g, + [out,optional] ID3D11Device** h, + [out,optional] D3D_FEATURE_LEVEL* i, + [out,optional] ID3D11DeviceContext** j ); typedef HRESULT (* PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)( - [in,optional] IDXGIAdapter*, + [in,optional] IDXGIAdapter*, D3D_DRIVER_TYPE, HMODULE, UINT, - [in,optional] const D3D_FEATURE_LEVEL*, + [in,optional] const D3D_FEATURE_LEVEL*, UINT, UINT, - [in, optional] const DXGI_SWAP_CHAIN_DESC*, + [in, optional] const DXGI_SWAP_CHAIN_DESC*, [out,optional] IDXGISwapChain**, - [out,optional] ID3D11Device**, + [out,optional] ID3D11Device**, [out,optional] D3D_FEATURE_LEVEL*, [out,optional] ID3D11DeviceContext** ); HRESULT D3D11CreateDeviceAndSwapChain( - [in,optional] IDXGIAdapter* pAdapter, - [in] D3D_DRIVER_TYPE DriverType, - [in] HMODULE Software, - [in] UINT Flags, - [in,optional] const D3D_FEATURE_LEVEL* pFeatureLevels, - [in] UINT FeatureLevels, - [in] UINT SDKVersion, - [in,optional] const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, - [out,optional] IDXGISwapChain** ppSwapChain, - [out,optional] ID3D11Device** ppDevice, - [out,optional] D3D_FEATURE_LEVEL* pFeatureLevel, - [out,optional] ID3D11DeviceContext** ppImmediateContext + [in,optional] IDXGIAdapter* a, + [in] D3D_DRIVER_TYPE b, + [in] HMODULE c, + [in] UINT d, + [in,optional] const D3D_FEATURE_LEVEL* e, + [in] UINT f, + [in] UINT g, + [in,optional] const DXGI_SWAP_CHAIN_DESC* h, + [out,optional] IDXGISwapChain** i, + [out,optional] ID3D11Device** j, + [out,optional] D3D_FEATURE_LEVEL* k, + [out,optional] ID3D11DeviceContext** l ); diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl index cf4ae1b68ee..bb20d91053e 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/d3d11shader.idl @@ -156,35 +156,35 @@ typedef struct _D3D11_SHADER_INPUT_BIND_DESC interface ID3D11ShaderReflectionType { HRESULT GetDesc( - [out] D3D11_SHADER_TYPE_DESC *pDesc + [out] D3D11_SHADER_TYPE_DESC *a ); ID3D11ShaderReflectionType* GetMemberTypeByIndex( - [in] UINT Index + [in] UINT a ); ID3D11ShaderReflectionType* GetMemberTypeByName( - [in] LPCSTR Name + [in] LPCSTR a ); LPCSTR GetMemberTypeName( - [in] UINT Index + [in] UINT a ); HRESULT IsEqual( - [in] ID3D11ShaderReflectionType* pType + [in] ID3D11ShaderReflectionType* a ); ID3D11ShaderReflectionType* GetSubType(); ID3D11ShaderReflectionType* GetBaseClass(); UINT GetNumInterfaces(); ID3D11ShaderReflectionType* GetInterfaceByIndex( - [in] UINT uIndex + [in] UINT a ); HRESULT IsOfType( - [in] ID3D11ShaderReflectionType* pType + [in] ID3D11ShaderReflectionType* a ); HRESULT ImplementsInterface( - [in] ID3D11ShaderReflectionType* pBase + [in] ID3D11ShaderReflectionType* a ); }; @@ -194,14 +194,14 @@ interface ID3D11ShaderReflectionConstantBuffer; interface ID3D11ShaderReflectionVariable { HRESULT GetDesc( - [out] D3D11_SHADER_VARIABLE_DESC *pDesc + [out] D3D11_SHADER_VARIABLE_DESC *a ); ID3D11ShaderReflectionType* GetType(); ID3D11ShaderReflectionConstantBuffer* GetBuffer(); UINT GetInterfaceSlot( - [in] UINT uArrayIndex + [in] UINT a ); }; @@ -209,15 +209,15 @@ interface ID3D11ShaderReflectionVariable interface ID3D11ShaderReflectionConstantBuffer { HRESULT GetDesc( - [out] D3D11_SHADER_BUFFER_DESC *pDesc + [out] D3D11_SHADER_BUFFER_DESC *a ); ID3D11ShaderReflectionVariable* GetVariableByIndex( - [in] UINT Index + [in] UINT a ); ID3D11ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR a ); }; @@ -225,45 +225,45 @@ interface ID3D11ShaderReflectionConstantBuffer interface ID3D11ShaderReflection { HRESULT GetDesc( - [out] D3D11_SHADER_DESC *pDesc + [out] D3D11_SHADER_DESC *a ); ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByIndex( - [in] UINT Index + [in] UINT a ); ID3D11ShaderReflectionConstantBuffer* GetConstantBufferByName( - [in] LPCSTR Name + [in] LPCSTR a ); HRESULT GetResourceBindingDesc( - [in] UINT ResourceIndex, - [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc + [in] UINT a, + [out] D3D11_SHADER_INPUT_BIND_DESC *b ); HRESULT GetInputParameterDesc( - [in] UINT ParameterIndex, - [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc + [in] UINT a, + [out] D3D11_SIGNATURE_PARAMETER_DESC *b ); HRESULT GetOutputParameterDesc ( - [in] UINT ParameterIndex, - [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc + [in] UINT a, + [out] D3D11_SIGNATURE_PARAMETER_DESC *b ); HRESULT GetPatchConstantParameterDesc( - [in] UINT ParameterIndex, - [out] D3D11_SIGNATURE_PARAMETER_DESC *pDesc + [in] UINT a, + [out] D3D11_SIGNATURE_PARAMETER_DESC *b ); ID3D11ShaderReflectionVariable* GetVariableByName( - [in] LPCSTR Name + [in] LPCSTR a ); HRESULT GetResourceBindingDescByName( - [in] LPCSTR Name, - [out] D3D11_SHADER_INPUT_BIND_DESC *pDesc + [in] LPCSTR a, + [out] D3D11_SHADER_INPUT_BIND_DESC *b ); UINT GetMovInstructionCount(); @@ -275,13 +275,13 @@ interface ID3D11ShaderReflection UINT GetNumInterfaceSlots(); HRESULT GetMinFeatureLevel( - [out] D3D_FEATURE_LEVEL* pLevel + [out] D3D_FEATURE_LEVEL* a ); UINT GetThreadGroupSize( - [out,optional] UINT* pSizeX, - [out,optional] UINT* pSizeY, - [out,optional] UINT* pSizeZ + [out,optional] UINT* a, + [out,optional] UINT* b, + [out,optional] UINT* c ); }; diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl b/src/gallium/state_trackers/d3d1x/d3dapi/d3dcommon.idl index d95a351eaf2..dd901431684 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, - [out] LPCVOID *ppData, - [in] UINT *pBytes + [in] D3D_INCLUDE_TYPE a, + [in] LPCSTR b, + [in] LPCVOID c, + [out] LPCVOID *d, + [in] UINT *e ); HRESULT Close( - [in] LPCVOID pData + [in] LPCVOID a ); }; diff --git a/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl index 247a7ddd11f..86ef261f671 100644 --- a/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl +++ b/src/gallium/state_trackers/d3d1x/d3dapi/dxgi.idl @@ -135,22 +135,22 @@ typedef struct DXGI_SHARED_RESOURCE { interface IDXGIObject : IUnknown { HRESULT SetPrivateData( - [in] REFGUID guid, - [in] UINT data_size, - [in] const void *data + [in] REFGUID a, + [in] UINT b, + [in] const void *c ); HRESULT SetPrivateDataInterface( - [in] REFGUID guid, - [in] const IUnknown *object + [in] REFGUID a, + [in] const IUnknown *b ); HRESULT GetPrivateData( - [in] REFGUID guid, - [in, out] UINT *data_size, - [out] void *data + [in] REFGUID a, + [in, out] UINT *b, + [out] void *c ); HRESULT GetParent( - [in] REFIID riid, - [out] void **parent + [in] REFIID a, + [out] void **b ); } @@ -162,8 +162,8 @@ interface IDXGIObject : IUnknown interface IDXGIDeviceSubObject : IDXGIObject { HRESULT GetDevice( - [in] REFIID riid, - [out] void **device + [in] REFIID a, + [out] void **b ); } @@ -175,11 +175,11 @@ interface IDXGIDeviceSubObject : IDXGIObject interface IDXGISurface : IDXGIDeviceSubObject { HRESULT GetDesc( - [out] DXGI_SURFACE_DESC *desc + [out] DXGI_SURFACE_DESC *a ); HRESULT Map( - [out] DXGI_MAPPED_RECT *mapped_rect, - [in] UINT flags + [out] DXGI_MAPPED_RECT *a, + [in] UINT b ); HRESULT Unmap( ); @@ -193,44 +193,44 @@ interface IDXGISurface : IDXGIDeviceSubObject interface IDXGIOutput : IDXGIObject { HRESULT GetDesc( - [out] DXGI_OUTPUT_DESC *desc + [out] DXGI_OUTPUT_DESC *a ); HRESULT GetDisplayModeList( - [in] DXGI_FORMAT format, - [in] UINT flags, - [in, out] UINT *mode_count, - [out] DXGI_MODE_DESC *desc + [in] DXGI_FORMAT a, + [in] UINT b, + [in, out] UINT *c, + [out] DXGI_MODE_DESC *d ); HRESULT FindClosestMatchingMode( - [in] const DXGI_MODE_DESC *mode, - [out] DXGI_MODE_DESC *closest_match, - [in] IUnknown *device + [in] const DXGI_MODE_DESC *a, + [out] DXGI_MODE_DESC *b, + [in] IUnknown *c ); HRESULT WaitForVBlank( ); HRESULT TakeOwnership( - [in] IUnknown *device, - [in] BOOL exclusive + [in] IUnknown *a, + [in] BOOL b ); void ReleaseOwnership( ); HRESULT GetGammaControlCapabilities( - [out] DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps + [out] DXGI_GAMMA_CONTROL_CAPABILITIES *a ); HRESULT SetGammaControl( - [in] const DXGI_GAMMA_CONTROL *gamma_control + [in] const DXGI_GAMMA_CONTROL *a ); HRESULT GetGammaControl( - [out] DXGI_GAMMA_CONTROL *gamma_control + [out] DXGI_GAMMA_CONTROL *a ); HRESULT SetDisplaySurface( - [in] IDXGISurface *surface + [in] IDXGISurface *a ); HRESULT GetDisplaySurfaceData( - [in] IDXGISurface *surface + [in] IDXGISurface *a ); HRESULT GetFrameStatistics( - [out] DXGI_FRAME_STATISTICS *stats + [out] DXGI_FRAME_STATISTICS *a ); } @@ -242,15 +242,15 @@ interface IDXGIOutput : IDXGIObject interface IDXGIAdapter : IDXGIObject { HRESULT EnumOutputs( - [in] UINT output_idx, - [in, out] IDXGIOutput **output + [in] UINT a, + [in, out] IDXGIOutput **b ); HRESULT GetDesc( - [out] DXGI_ADAPTER_DESC *desc + [out] DXGI_ADAPTER_DESC *a ); HRESULT CheckInterfaceSupport( - [in] REFGUID guid, - [out] LARGE_INTEGER *umd_version + [in] REFGUID a, + [out] LARGE_INTEGER *b ); } @@ -262,43 +262,43 @@ interface IDXGIAdapter : IDXGIObject interface IDXGISwapChain : IDXGIDeviceSubObject { HRESULT Present( - [in] UINT sync_interval, - [in] UINT flags + [in] UINT a, + [in] UINT b ); HRESULT GetBuffer( - [in] UINT buffer_idx, - [in] REFIID riid, - [in, out] void **surface + [in] UINT a, + [in] REFIID b, + [in, out] void **c ); HRESULT SetFullscreenState( - [in] BOOL fullscreen, - [in] IDXGIOutput *target + [in] BOOL a, + [in] IDXGIOutput *b ); HRESULT GetFullscreenState( - [out] BOOL *fullscreen, - [out] IDXGIOutput **target + [out] BOOL *a, + [out] IDXGIOutput **b ); HRESULT GetDesc( - [out] DXGI_SWAP_CHAIN_DESC *desc + [out] DXGI_SWAP_CHAIN_DESC *a ); HRESULT ResizeBuffers( - [in] UINT buffer_count, - [in] UINT width, - [in] UINT height, - [in] DXGI_FORMAT format, - [in] UINT flags + [in] UINT a, + [in] UINT b, + [in] UINT c, + [in] DXGI_FORMAT d, + [in] UINT e ); HRESULT ResizeTarget( - [in] const DXGI_MODE_DESC *target_mode_desc + [in] const DXGI_MODE_DESC *a ); HRESULT GetContainingOutput( - [out] IDXGIOutput **output + [out] IDXGIOutput **a ); HRESULT GetFrameStatistics( - [out] DXGI_FRAME_STATISTICS *stats + [out] DXGI_FRAME_STATISTICS *a ); HRESULT GetLastPresentCount( - [out] UINT *last_present_count + [out] UINT *a ); } @@ -310,24 +310,24 @@ interface IDXGISwapChain : IDXGIDeviceSubObject interface IDXGIFactory : IDXGIObject { HRESULT EnumAdapters( - [in] UINT adapter_idx, - [out] IDXGIAdapter **adapter + [in] UINT a, + [out] IDXGIAdapter **b ); HRESULT MakeWindowAssociation( - [in] HWND window, - [in] UINT flags + [in] HWND a, + [in] UINT b ); HRESULT GetWindowAssociation( - [in] HWND *window + [in] HWND *a ); HRESULT CreateSwapChain( - [in] IUnknown *device, - [in] DXGI_SWAP_CHAIN_DESC *desc, - [out] IDXGISwapChain **swapchain + [in] IUnknown *a, + [in] DXGI_SWAP_CHAIN_DESC *b, + [out] IDXGISwapChain **c ); HRESULT CreateSoftwareAdapter( - [in] HMODULE swrast, - [out] IDXGIAdapter **adapter + [in] HMODULE a, + [out] IDXGIAdapter **b ); } @@ -341,25 +341,25 @@ interface IDXGIFactory : IDXGIObject interface IDXGIDevice : IDXGIObject { HRESULT GetAdapter( - [out] IDXGIAdapter **adapter + [out] IDXGIAdapter **a ); 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 + [in] const DXGI_SURFACE_DESC *a, + [in] UINT b, + [in] DXGI_USAGE c, + [in] const DXGI_SHARED_RESOURCE *d, + [out] IDXGISurface **e ); HRESULT QueryResourceResidency( - [in] IUnknown *const *resources, - [out] DXGI_RESIDENCY *residency, - [in] UINT resource_count + [in] IUnknown *const *a, + [out] DXGI_RESIDENCY *b, + [in] UINT c ); HRESULT SetGPUThreadPriority( - [in] INT priority + [in] INT a ); HRESULT GetGPUThreadPriority( - [out] INT *priority + [out] INT *a ); } @@ -407,19 +407,19 @@ typedef struct DXGI_ADAPTER_DESC1 interface IDXGIResource : IDXGIDeviceSubObject { HRESULT GetSharedHandle( - [out] HANDLE *pSharedHandle + [out] HANDLE *a ); HRESULT GetUsage( - [out] DXGI_USAGE *pUsage + [out] DXGI_USAGE *a ); HRESULT SetEvictionPriority( - [in] UINT EvictionPriority + [in] UINT a ); HRESULT GetEvictionPriority( - [out] UINT *pEvictionPriority + [out] UINT *a ); }; @@ -427,12 +427,12 @@ interface IDXGIResource : IDXGIDeviceSubObject interface IDXGISurface1 : IDXGISurface { HRESULT GetDC( - [in] BOOL Discard, - [out] HDC *phdc + [in] BOOL a, + [out] HDC *b ); HRESULT ReleaseDC( - [in, optional] RECT *pDirtyRect + [in, optional] RECT *a ); }; @@ -440,11 +440,11 @@ interface IDXGISurface1 : IDXGISurface interface IDXGIDevice1 : IDXGIDevice { HRESULT SetMaximumFrameLatency( - [in] UINT MaxLatency + [in] UINT a ); HRESULT GetMaximumFrameLatency( - [out] UINT *pMaxLatency + [out] UINT *a ); }; @@ -452,7 +452,7 @@ interface IDXGIDevice1 : IDXGIDevice interface IDXGIAdapter1 : IDXGIAdapter { HRESULT GetDesc1( - [out] DXGI_ADAPTER_DESC1 *pDesc + [out] DXGI_ADAPTER_DESC1 *a ); }; @@ -460,8 +460,8 @@ interface IDXGIAdapter1 : IDXGIAdapter interface IDXGIFactory1 : IDXGIFactory { HRESULT EnumAdapters1( - [in] UINT Adapter, - [out] IDXGIAdapter1 **ppAdapter + [in] UINT a, + [out] IDXGIAdapter1 **b ); BOOL IsCurrent(); -- cgit v1.2.3