From 47ffd7ae956d2cd04d3d0558861e61157f79a36f Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 14 Dec 2006 22:47:59 +0800 Subject: [PATCH] wined3d: Make some data const. --- dlls/wined3d/arb_program_shader.c | 4 ++-- dlls/wined3d/baseshader.c | 2 +- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/glsl_shader.c | 4 ++-- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/vertexdeclaration.c | 4 ++-- dlls/wined3d/wined3d_private.h | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 75c22f50bc8..b4aa371adfb 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -187,7 +187,7 @@ void shader_generate_arb_declarations( max_constantsF, max_constantsF - 1); } -static const char* shift_tab[] = { +static const char * const shift_tab[] = { "dummy", /* 0 (none) */ "coefmul.x", /* 1 (x2) */ "coefmul.y", /* 2 (x4) */ @@ -361,7 +361,7 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param, IWineD3DVertexShaderImpl* This = (IWineD3DVertexShaderImpl*) arg->shader; /* oPos, oFog and oPts in D3D */ - static const char* hwrastout_reg_names[] = { "TMP_OUT", "TMP_FOG", "result.pointsize" }; + static const char * const hwrastout_reg_names[] = { "TMP_OUT", "TMP_FOG", "result.pointsize" }; DWORD reg = param & WINED3DSP_REGNUM_MASK; DWORD regtype = shader_get_regtype(param); diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index c1c162b0e20..f87716af950 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -502,7 +502,7 @@ void shader_dump_param( int input) { IWineD3DBaseShaderImpl* This = (IWineD3DBaseShaderImpl*) iface; - static const char* rastout_reg_names[] = { "oPos", "oFog", "oPts" }; + static const char * const rastout_reg_names[] = { "oPos", "oFog", "oPts" }; char swizzle_reg_chars[4]; DWORD reg = param & WINED3DSP_REGNUM_MASK; diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 7dc33e01e55..a5600844c2b 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -149,7 +149,7 @@ static void init_materials(IWineD3DDevice *iface, BOOL isDiffuseSupplied) { } -static GLfloat invymat[16] = { +static const GLfloat invymat[16] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index b290f2f34a7..dffc1aae8d0 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -481,7 +481,7 @@ static void shader_glsl_add_param( char *out_str); /** Used for opcode modifiers - They multiply the result by the specified amount */ -static const char* shift_glsl_tab[] = { +static const char * const shift_glsl_tab[] = { "", /* 0 (none) */ "2.0 * ", /* 1 (x2) */ "4.0 * ", /* 2 (x4) */ @@ -596,7 +596,7 @@ static void shader_glsl_get_register_name( SHADER_OPCODE_ARG* arg) { /* oPos, oFog and oPts in D3D */ - const char* hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" }; + static const char * const hwrastout_reg_names[] = { "gl_Position", "gl_FogFragCoord", "gl_PointSize" }; DWORD reg = param & WINED3DSP_REGNUM_MASK; DWORD regtype = shader_get_regtype(param); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 865703d0c4c..1eb787a83b2 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -564,7 +564,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *ifac } -IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl = +const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl = { /* IUnknown */ IWineD3DSwapChainImpl_QueryInterface, diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index a512e81a737..1789646105a 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -61,7 +61,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_decl); /** Vertex Shader Declaration 8 data types tokens */ #define MAX_VSHADER_DECL_TYPES 8 -static CONST char* VertexDecl8_DataTypes[] = { +static const char * const VertexDecl8_DataTypes[] = { "D3DVSDT_FLOAT1", "D3DVSDT_FLOAT2", "D3DVSDT_FLOAT3", @@ -73,7 +73,7 @@ static CONST char* VertexDecl8_DataTypes[] = { NULL }; -static CONST char* VertexDecl8_Registers[] = { +static const char * const VertexDecl8_Registers[] = { "D3DVSDE_POSITION", "D3DVSDE_BLENDWEIGHT", "D3DVSDE_BLENDINDICES", diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index aaa7de7ae77..2f5e8874bdb 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1242,7 +1242,7 @@ typedef struct WineQueryOcclusionData { typedef struct IWineD3DSwapChainImpl { /*IUnknown part*/ - IWineD3DSwapChainVtbl *lpVtbl; + const IWineD3DSwapChainVtbl *lpVtbl; LONG ref; /* Note: Ref counting not required */ IUnknown *parent; @@ -1271,7 +1271,7 @@ typedef struct IWineD3DSwapChainImpl Drawable drawable; } IWineD3DSwapChainImpl; -extern IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl; +extern const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl; /***************************************************************************** * Utility function prototypes -- 2.11.4.GIT