wined3d: Explicitly pass data and gl_info to shader_select_depth_blt().

This commit is contained in:
Henri Verbeet 2010-11-29 23:08:39 +01:00 committed by Alexandre Julliard
parent 363d8a316e
commit 93a824d744
5 changed files with 11 additions and 12 deletions

View File

@ -4624,13 +4624,12 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
}
/* GL locking is done by the caller */
static void shader_arb_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size)
static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info,
enum tex_types tex_type, const SIZE *ds_mask_size)
{
const float mask[] = {0.0f, 0.0f, (float)ds_mask_size->cx, (float)ds_mask_size->cy};
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
BOOL masked = ds_mask_size->cx && ds_mask_size->cy;
struct shader_arb_priv *priv = This->shader_priv;
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct shader_arb_priv *priv = shader_priv;
GLuint *blt_fprogram;
if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info);

View File

@ -4622,13 +4622,11 @@ static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS
}
/* GL locking is done by the caller */
static void shader_glsl_select_depth_blt(IWineD3DDevice *iface,
static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info,
enum tex_types tex_type, const SIZE *ds_mask_size)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
BOOL masked = ds_mask_size->cx && ds_mask_size->cy;
struct shader_glsl_priv *priv = This->shader_priv;
struct shader_glsl_priv *priv = shader_priv;
GLhandleARB *blt_program;
GLint loc;

View File

@ -1510,7 +1510,8 @@ static void shader_cleanup(IWineD3DBaseShader *iface)
static void shader_none_handle_instruction(const struct wined3d_shader_instruction *ins) {}
static void shader_none_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {}
static void shader_none_select_depth_blt(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size) {}
static void shader_none_select_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info,
enum tex_types tex_type, const SIZE *ds_mask_size) {}
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) {}

View File

@ -4102,8 +4102,8 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl
if (compare_mode != GL_NONE) glTexParameteri(info.bind_target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
device->shader_backend->shader_select_depth_blt((IWineD3DDevice *)device,
info.tex_type, &This->ds_current_size);
device->shader_backend->shader_select_depth_blt(device->shader_priv,
gl_info, info.tex_type, &This->ds_current_size);
glBegin(GL_TRIANGLE_STRIP);
glTexCoord3fv(info.coords[0]);

View File

@ -744,7 +744,8 @@ struct wined3d_state;
typedef struct {
void (*shader_handle_instruction)(const struct wined3d_shader_instruction *);
void (*shader_select)(const struct wined3d_context *context, BOOL usePS, BOOL useVS);
void (*shader_select_depth_blt)(IWineD3DDevice *iface, enum tex_types tex_type, const SIZE *ds_mask_size);
void (*shader_select_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info,
enum tex_types tex_type, const SIZE *ds_mask_size);
void (*shader_deselect_depth_blt)(IWineD3DDevice *iface);
void (*shader_update_float_vertex_constants)(IWineD3DDevice *iface, UINT start, UINT count);
void (*shader_update_float_pixel_constants)(IWineD3DDevice *iface, UINT start, UINT count);