Module: wine Branch: master Commit: 36190dd5e6812ac2f57c1d74d0c785dee23c96f2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=36190dd5e6812ac2f57c1d74d0...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Sep 5 09:54:42 2013 +0200
d3dcompiler: Avoid LPCSTR.
---
dlls/d3dcompiler_43/reflection.c | 12 ++++++------ dlls/d3dcompiler_43/tests/asm.c | 6 ++---- include/d3d11shader.h | 24 ++++++++++++------------ 3 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index f516e4a..77e7ac3 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -445,7 +445,7 @@ static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompil }
static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName( - ID3D11ShaderReflection *iface, LPCSTR name) + ID3D11ShaderReflection *iface, const char *name) { struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); unsigned int i; @@ -547,7 +547,7 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantP }
static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName( - ID3D11ShaderReflection *iface, LPCSTR name) + ID3D11ShaderReflection *iface, const char *name) { struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); unsigned int i, k; @@ -582,7 +582,7 @@ static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_sha }
static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName( - ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc) + ID3D11ShaderReflection *iface, const char *name, D3D11_SHADER_INPUT_BIND_DESC *desc) { struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); unsigned int i; @@ -767,7 +767,7 @@ static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_ref }
static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByName( - ID3D11ShaderReflectionConstantBuffer *iface, LPCSTR name) + ID3D11ShaderReflectionConstantBuffer *iface, const char *name) { struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface); unsigned int i; @@ -924,7 +924,7 @@ static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflect }
static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeByName( - ID3D11ShaderReflectionType *iface, LPCSTR name) + ID3D11ShaderReflectionType *iface, const char *name) { struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); unsigned int i; @@ -953,7 +953,7 @@ static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflect return &null_type.ID3D11ShaderReflectionType_iface; }
-static LPCSTR STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeName( +static const char * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeName( ID3D11ShaderReflectionType *iface, UINT index) { struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); diff --git a/dlls/d3dcompiler_43/tests/asm.c b/dlls/d3dcompiler_43/tests/asm.c index e966f94..cb1453f 100644 --- a/dlls/d3dcompiler_43/tests/asm.c +++ b/dlls/d3dcompiler_43/tests/asm.c @@ -27,10 +27,8 @@ perhaps with a different name? */ #define D3DXERR_INVALIDDATA 0x88760b59
-HRESULT WINAPI D3DAssemble(LPCVOID data, SIZE_T datasize, LPCSTR filename, - const D3D_SHADER_MACRO *defines, LPD3DINCLUDE include, - UINT flags, - LPD3DBLOB* shader, LPD3DBLOB* error_messages); +HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename, const D3D_SHADER_MACRO *defines, + ID3DInclude *include, UINT flags, ID3DBlob **shader, ID3DBlob **error_messages);
struct shader_test { const char *text; diff --git a/include/d3d11shader.h b/include/d3d11shader.h index 6a0ee51..ea271f6 100644 --- a/include/d3d11shader.h +++ b/include/d3d11shader.h @@ -35,7 +35,7 @@ typedef D3D_TESSELLATOR_OUTPUT_PRIMITIVE D3D11_TESSELLATOR_OUTPUT_PRIMITIVE; typedef struct _D3D11_SHADER_DESC { UINT Version; - LPCSTR Creator; + const char *Creator; UINT Flags; UINT ConstantBuffers; UINT BoundResources; @@ -76,7 +76,7 @@ typedef struct _D3D11_SHADER_DESC
typedef struct _D3D11_SHADER_VARIABLE_DESC { - LPCSTR Name; + const char *Name; UINT StartOffset; UINT Size; UINT uFlags; @@ -96,12 +96,12 @@ typedef struct _D3D11_SHADER_TYPE_DESC UINT Elements; UINT Members; UINT Offset; - LPCSTR Name; + const char *Name; } D3D11_SHADER_TYPE_DESC;
typedef struct _D3D11_SHADER_BUFFER_DESC { - LPCSTR Name; + const char *Name; D3D_CBUFFER_TYPE Type; UINT Variables; UINT Size; @@ -110,7 +110,7 @@ typedef struct _D3D11_SHADER_BUFFER_DESC
typedef struct _D3D11_SHADER_INPUT_BIND_DESC { - LPCSTR Name; + const char *Name; D3D_SHADER_INPUT_TYPE Type; UINT BindPoint; UINT BindCount; @@ -122,7 +122,7 @@ typedef struct _D3D11_SHADER_INPUT_BIND_DESC
typedef struct _D3D11_SIGNATURE_PARAMETER_DESC { - LPCSTR SemanticName; + const char *SemanticName; UINT SemanticIndex; UINT Register; D3D_NAME SystemValueType; @@ -139,8 +139,8 @@ DECLARE_INTERFACE(ID3D11ShaderReflectionType) { STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_TYPE_DESC *desc) PURE; STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByIndex)(THIS_ UINT index) PURE; - STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByName)(THIS_ LPCSTR name) PURE; - STDMETHOD_(LPCSTR, GetMemberTypeName)(THIS_ UINT index) PURE; + STDMETHOD_(struct ID3D11ShaderReflectionType *, GetMemberTypeByName)(THIS_ const char *name) PURE; + STDMETHOD_(const char *, GetMemberTypeName)(THIS_ UINT index) PURE; STDMETHOD(IsEqual)(THIS_ struct ID3D11ShaderReflectionType *type) PURE; STDMETHOD_(struct ID3D11ShaderReflectionType *, GetSubType)(THIS) PURE; STDMETHOD_(struct ID3D11ShaderReflectionType *, GetBaseClass)(THIS) PURE; @@ -170,7 +170,7 @@ DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer) { STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_BUFFER_DESC *desc) PURE; STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByIndex)(THIS_ UINT index) PURE; - STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE; + STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE; }; #undef INTERFACE
@@ -186,13 +186,13 @@ DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown) /* ID3D11ShaderReflection methods */ STDMETHOD(GetDesc)(THIS_ D3D11_SHADER_DESC *desc) PURE; STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByIndex)(THIS_ UINT index) PURE; - STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ LPCSTR name) PURE; + STDMETHOD_(struct ID3D11ShaderReflectionConstantBuffer *, GetConstantBufferByName)(THIS_ const char *name) PURE; STDMETHOD(GetResourceBindingDesc)(THIS_ UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE; STDMETHOD(GetInputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE; STDMETHOD(GetOutputParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE; STDMETHOD(GetPatchConstantParameterDesc)(THIS_ UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) PURE; - STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ LPCSTR name) PURE; - STDMETHOD(GetResourceBindingDescByName)(THIS_ LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE; + STDMETHOD_(struct ID3D11ShaderReflectionVariable *, GetVariableByName)(THIS_ const char *name) PURE; + STDMETHOD(GetResourceBindingDescByName)(THIS_ const char *name, D3D11_SHADER_INPUT_BIND_DESC *desc) PURE; STDMETHOD_(UINT, GetMovInstructionCount)(THIS) PURE; STDMETHOD_(UINT, GetMovcInstructionCount)(THIS) PURE; STDMETHOD_(UINT, GetConversionInstructionCount)(THIS) PURE;