From ee49230cd28d804b46920ed69db1003d82424f29 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 16 Sep 2008 14:55:39 +0200 Subject: [PATCH] Make some ARB program structs and functions private to the backend. --- dlls/wined3d/arb_program_shader.c | 26 +++++++++++++++++++++----- dlls/wined3d/wined3d_private.h | 30 ------------------------------ 2 files changed, 21 insertions(+), 35 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index d972570e418..2bb70c30a12 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -39,6 +39,22 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_caps); #define GLINFO_LOCATION (*gl_info) +/* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vshader_constantsF) - 1, + * so upload them above that + */ +#define ARB_SHADER_PRIVCONST_BASE GL_LIMITS(vshader_constantsF) +#define ARB_SHADER_PRIVCONST_POS ARB_SHADER_PRIVCONST_BASE + 0 + +/* ARB_program_shader private data */ +struct shader_arb_priv { + GLuint current_vprogram_id; + GLuint current_fprogram_id; + GLuint depth_blt_vprogram_id; + GLuint depth_blt_fprogram_id; + BOOL use_arbfp_fixed_func; + struct hash_table_t *fragment_shaders; +}; + /******************************************************** * ARB_[vertex/fragment]_program helper functions follow ********************************************************/ @@ -150,7 +166,7 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, Win * We only support float constants in ARB at the moment, so don't * worry about the Integers or Booleans */ -void shader_arb_load_constants( +static void shader_arb_load_constants( IWineD3DDevice* device, char usePixelShader, char useVertexShader) { @@ -234,7 +250,7 @@ void shader_arb_load_constants( } /* Generate the variable & register declarations for the ARB_vertex_program output target */ -void shader_generate_arb_declarations( +static void shader_generate_arb_declarations( IWineD3DBaseShader *iface, shader_reg_maps* reg_maps, SHADER_BUFFER* buffer, @@ -3195,7 +3211,7 @@ static void arbfp_blit_free(IWineD3DDevice *iface) { LEAVE_GL(); } -BOOL gen_planar_yuv_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textype, char *luminance) { +static BOOL gen_planar_yuv_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textype, char *luminance) { char chroma; const char *tex, *texinstr; @@ -3281,7 +3297,7 @@ BOOL gen_planar_yuv_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textyp return TRUE; } -BOOL gen_yv12_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textype, char *luminance) { +static BOOL gen_yv12_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textype, char *luminance) { const char *tex; switch(textype) { @@ -3426,7 +3442,7 @@ BOOL gen_yv12_read(SHADER_BUFFER *buffer, WINED3DFORMAT fmt, GLenum textype, cha return TRUE; } -GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, WINED3DFORMAT fmt, GLenum textype) { +static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, WINED3DFORMAT fmt, GLenum textype) { GLenum shader; SHADER_BUFFER buffer; char luminance_component; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 6bb7e506a61..529d4bf0f43 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -255,16 +255,6 @@ extern const shader_backend_t glsl_shader_backend; extern const shader_backend_t arb_program_shader_backend; extern const shader_backend_t none_shader_backend; -/* ARB_program_shader private data */ -struct shader_arb_priv { - GLuint current_vprogram_id; - GLuint current_fprogram_id; - GLuint depth_blt_vprogram_id; - GLuint depth_blt_fprogram_id; - BOOL use_arbfp_fixed_func; - struct hash_table_t *fragment_shaders; -}; - /* X11 locking */ extern void (*wine_tsx11_lock_ptr)(void); @@ -468,8 +458,6 @@ extern glAttribFunc normal_funcs[WINED3DDECLTYPE_UNUSED]; #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \ (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1) -void depth_copy(IWineD3DDevice *iface); - /* Routines and structures related to state management */ typedef struct WineD3DContext WineD3DContext; typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *ctx); @@ -2023,12 +2011,6 @@ extern BOOL vshader_input_is_color( extern HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object); -/* ARB_[vertex/fragment]_program helper functions */ -extern void shader_arb_load_constants( - IWineD3DDevice* device, - char usePixelShader, - char useVertexShader); - /* ARB shader program Prototypes */ extern void shader_hw_def(SHADER_OPCODE_ARG *arg); @@ -2193,12 +2175,6 @@ extern HRESULT shader_get_registers_used( CONST DWORD* pToken, IWineD3DStateBlockImpl *stateBlock); -extern void shader_generate_arb_declarations( - IWineD3DBaseShader *iface, - shader_reg_maps* reg_maps, - SHADER_BUFFER* buffer, - WineD3D_GL_Info* gl_info); - extern void shader_generate_main( IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, @@ -2297,12 +2273,6 @@ static inline BOOL shader_constant_is_local(IWineD3DBaseShaderImpl* This, DWORD } -/* Internally used shader constants. Applications can use constants 0 to GL_LIMITS(vshader_constantsF) - 1, - * so upload them above that - */ -#define ARB_SHADER_PRIVCONST_BASE GL_LIMITS(vshader_constantsF) -#define ARB_SHADER_PRIVCONST_POS ARB_SHADER_PRIVCONST_BASE + 0 - /***************************************************************************** * IDirect3DVertexShader implementation structure */ -- 2.11.4.GIT