From 9b067a6ca596f7f2e770d7556f231d929e8b6aa9 Mon Sep 17 00:00:00 2001 From: Tobias Jakobi Date: Thu, 9 Apr 2009 00:55:38 +0200 Subject: [PATCH] wined3d: Add load_np2fixup_constants function to shader backend. --- dlls/wined3d/arb_program_shader.c | 11 +++++++++++ dlls/wined3d/baseshader.c | 2 ++ dlls/wined3d/glsl_shader.c | 11 +++++++++++ dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 25 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 8c08771e0ed..f046b6db562 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -173,6 +173,16 @@ static unsigned int shader_arb_load_constantsF(IWineD3DBaseShaderImpl* This, con } } +/** + * Loads the texture dimensions for NP2 fixup into the currently set ARB_[vertex/fragment]_programs. + */ +static void shader_arb_load_np2fixup_constants( + IWineD3DDevice* device, + char usePixelShader, + char useVertexShader) { + /* not implemented */ +} + /** * Loads the app-supplied constants into the currently set ARB_[vertex/fragment]_programs. * @@ -2306,6 +2316,7 @@ const shader_backend_t arb_program_shader_backend = { shader_arb_update_float_vertex_constants, shader_arb_update_float_pixel_constants, shader_arb_load_constants, + shader_arb_load_np2fixup_constants, shader_arb_destroy, shader_arb_alloc, shader_arb_free, diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index 235778e40e7..f24f9bc9da1 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -1094,6 +1094,7 @@ static void shader_none_deselect_depth_blt(IWineD3DDevice *iface) {} static void shader_none_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count) {} static void shader_none_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count) {} static void shader_none_load_constants(IWineD3DDevice *iface, char usePS, char useVS) {} +static void shader_none_load_np2fixup_constants(IWineD3DDevice *iface, char usePS, char useVS) {} static void shader_none_destroy(IWineD3DBaseShader *iface) {} static HRESULT shader_none_alloc(IWineD3DDevice *iface) {return WINED3D_OK;} static void shader_none_free(IWineD3DDevice *iface) {} @@ -1143,6 +1144,7 @@ const shader_backend_t none_shader_backend = { shader_none_update_float_vertex_constants, shader_none_update_float_pixel_constants, shader_none_load_constants, + shader_none_load_np2fixup_constants, shader_none_destroy, shader_none_alloc, shader_none_free, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 1ed2161cbde..626bda3eca6 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -482,6 +482,16 @@ static void reset_program_constant_version(void *value, void *context) entry->constant_version = 0; } +/** + * Loads the texture dimensions for NP2 fixup into the currently set GLSL program. + */ +static void shader_glsl_load_np2fixup_constants( + IWineD3DDevice* device, + char usePixelShader, + char useVertexShader) { + /* not implemented */ +} + /** * Loads the app-supplied constants into the currently set GLSL program. */ @@ -4281,6 +4291,7 @@ const shader_backend_t glsl_shader_backend = { shader_glsl_update_float_vertex_constants, shader_glsl_update_float_pixel_constants, shader_glsl_load_constants, + shader_glsl_load_np2fixup_constants, shader_glsl_destroy, shader_glsl_alloc, shader_glsl_free, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ebc75613732..a5ae4661bec 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -562,6 +562,7 @@ typedef struct { void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count); void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count); void (*shader_load_constants)(IWineD3DDevice *iface, char usePS, char useVS); + void (*shader_load_np2fixup_constants)(IWineD3DDevice *iface, char usePS, char useVS); void (*shader_destroy)(IWineD3DBaseShader *iface); HRESULT (*shader_alloc_private)(IWineD3DDevice *iface); void (*shader_free_private)(IWineD3DDevice *iface);