wined3d: Get rid of the IWineD3DDevice typedefs.

This commit is contained in:
Henri Verbeet 2011-05-16 23:01:23 +02:00 committed by Alexandre Julliard
parent 8d4ca1f815
commit 0e0e5c3e38
23 changed files with 951 additions and 1050 deletions

View File

@ -629,7 +629,7 @@ static void shader_arb_vs_local_constants(const struct arb_vs_compiled_shader *g
/* GL locking is done by the caller (state handler) */
static void shader_arb_load_constants(const struct wined3d_context *context, char usePixelShader, char useVertexShader)
{
IWineD3DDeviceImpl *device = context->swapchain->device;
struct wined3d_device *device = context->swapchain->device;
struct wined3d_stateblock *stateBlock = device->stateBlock;
const struct wined3d_gl_info *gl_info = context->gl_info;
struct shader_arb_priv *priv = device->shader_priv;
@ -658,7 +658,7 @@ static void shader_arb_load_constants(const struct wined3d_context *context, cha
}
}
static void shader_arb_update_float_vertex_constants(IWineD3DDeviceImpl *device, UINT start, UINT count)
static void shader_arb_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count)
{
struct wined3d_context *context = context_get_current();
@ -670,7 +670,7 @@ static void shader_arb_update_float_vertex_constants(IWineD3DDeviceImpl *device,
device->highest_dirty_vs_const = max(device->highest_dirty_vs_const, start + count);
}
static void shader_arb_update_float_pixel_constants(IWineD3DDeviceImpl *device, UINT start, UINT count)
static void shader_arb_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count)
{
struct wined3d_context *context = context_get_current();
@ -1341,7 +1341,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
const char *tex_type;
BOOL np2_fixup = FALSE;
struct wined3d_shader *shader = ins->ctx->shader;
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
struct shader_arb_ctx_priv *priv = ins->ctx->backend_data;
const char *mod;
BOOL pshader = shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type);
@ -3933,7 +3933,7 @@ static void init_output_registers(struct wined3d_shader *shader, DWORD sig_num,
"result.texcoord[0]", "result.texcoord[1]", "result.texcoord[2]", "result.texcoord[3]",
"result.texcoord[4]", "result.texcoord[5]", "result.texcoord[6]", "result.texcoord[7]"
};
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_shader_signature_element *sig;
const char *semantic_name;
DWORD semantic_idx, reg_idx;
@ -4196,7 +4196,7 @@ static GLuint shader_arb_generate_vshader(struct wined3d_shader *shader,
*/
if (!gl_info->supported[NV_VERTEX_PROGRAM])
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const char *color_init = arb_get_helper_value(WINED3D_SHADER_TYPE_VERTEX, ARB_0001);
shader_addline(buffer, "MOV result.color.secondary, %s;\n", color_init);
@ -4269,7 +4269,7 @@ static GLuint shader_arb_generate_vshader(struct wined3d_shader *shader,
static struct arb_ps_compiled_shader *find_arb_pshader(struct wined3d_shader *shader,
const struct arb_ps_compile_args *args)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
UINT i;
DWORD new_size;
@ -4366,7 +4366,7 @@ static inline BOOL vs_args_equal(const struct arb_vs_compile_args *stored, const
static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *shader,
const struct arb_vs_compile_args *args)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
DWORD use_map = device->strided_streams.use_map;
UINT i;
@ -4452,7 +4452,7 @@ static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *sh
static void find_arb_ps_compile_args(const struct wined3d_state *state,
const struct wined3d_shader *shader, struct arb_ps_compile_args *args)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
int i;
WORD int_skip;
@ -4507,7 +4507,7 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state,
static void find_arb_vs_compile_args(const struct wined3d_state *state,
const struct wined3d_shader *shader, struct arb_vs_compile_args *args)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
int i;
WORD int_skip;
@ -4583,10 +4583,10 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state,
/* GL locking is done by the caller */
static void shader_arb_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS)
{
IWineD3DDeviceImpl *This = context->swapchain->device;
struct shader_arb_priv *priv = This->shader_priv;
struct wined3d_device *device = context->swapchain->device;
struct shader_arb_priv *priv = device->shader_priv;
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &This->stateBlock->state;
const struct wined3d_state *state = &device->stateBlock->state;
int i;
/* Deal with pixel shaders first so the vertex shader arg function has the input signature ready */
@ -4611,7 +4611,8 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
glEnable(GL_FRAGMENT_PROGRAM_ARB);
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);");
}
TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", This, priv->current_fprogram_id);
TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n",
device, priv->current_fprogram_id);
/* Pixel Shader 1.x constants are clamped to [-1;1], Pixel Shader 2.0 constants are not. If switching between
* a 1.x and newer shader, reload the first 8 constants
@ -4619,7 +4620,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
if (priv->last_ps_const_clamped != ((struct arb_pshader_private *)ps->backend_data)->clamp_consts)
{
priv->last_ps_const_clamped = ((struct arb_pshader_private *)ps->backend_data)->clamp_consts;
This->highest_dirty_ps_const = max(This->highest_dirty_ps_const, 8);
device->highest_dirty_ps_const = max(device->highest_dirty_ps_const, 8);
for(i = 0; i < 8; i++)
{
context->pshader_const_dirty[i] = 1;
@ -4629,7 +4630,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
}
else
{
UINT rt_height = This->render_targets[0]->resource.height;
UINT rt_height = device->render_targets[0]->resource.height;
shader_arb_ps_local_constants(compiled, context, state, rt_height);
}
@ -4667,7 +4668,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
/* Enable OpenGL vertex programs */
glEnable(GL_VERTEX_PROGRAM_ARB);
checkGLcall("glEnable(GL_VERTEX_PROGRAM_ARB);");
TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", This, priv->current_vprogram_id);
TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", device, priv->current_vprogram_id);
shader_arb_vs_local_constants(compiled, context, state);
if(priv->last_vs_color_unclamp != compiled->need_color_unclamp) {
@ -4742,7 +4743,7 @@ static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3
static void shader_arb_destroy(struct wined3d_shader *shader)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
if (shader_is_pshader_version(shader->reg_maps.shader_version.type))
@ -4813,7 +4814,7 @@ static const struct wine_rb_functions sig_tree_functions =
sig_tree_compare
};
static HRESULT shader_arb_alloc(IWineD3DDeviceImpl *device)
static HRESULT shader_arb_alloc(struct wined3d_device *device)
{
struct shader_arb_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv));
if(wine_rb_init(&priv->signature_tree, &sig_tree_functions) == -1)
@ -4839,7 +4840,7 @@ static void release_signature(struct wine_rb_entry *entry, void *context)
}
/* Context activation is done by the caller. */
static void shader_arb_free(IWineD3DDeviceImpl *device)
static void shader_arb_free(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct shader_arb_priv *priv = device->shader_priv;
@ -5531,7 +5532,7 @@ static void arbfp_enable(BOOL enable)
LEAVE_GL();
}
static HRESULT arbfp_alloc(IWineD3DDeviceImpl *device)
static HRESULT arbfp_alloc(struct wined3d_device *device)
{
struct shader_arb_priv *priv;
/* Share private data between the shader backend and the pipeline replacement, if both
@ -5572,7 +5573,7 @@ static void arbfp_free_ffpshader(struct wine_rb_entry *entry, void *context)
}
/* Context activation is done by the caller. */
static void arbfp_free(IWineD3DDeviceImpl *device)
static void arbfp_free(struct wined3d_device *device)
{
struct shader_arb_priv *priv = device->fragment_priv;
@ -5625,7 +5626,7 @@ static void state_texfactor_arbfp(DWORD state_id,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
float col[4];
/* Don't load the parameter if we're using an arbfp pixel shader, otherwise we'll overwrite
@ -5650,7 +5651,7 @@ static void state_arb_specularenable(DWORD state_id,
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
float col[4];
/* Don't load the parameter if we're using an arbfp pixel shader, otherwise we'll overwrite
@ -5682,7 +5683,7 @@ static void set_bumpmat_arbfp(DWORD state_id, struct wined3d_stateblock *statebl
DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
float mat[2][2];
if (use_ps(state))
@ -5720,7 +5721,7 @@ static void tex_bumpenvlum_arbfp(DWORD state_id,
DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
float param[4];
if (use_ps(state))
@ -6252,7 +6253,7 @@ static void fragment_prog_arbfp(DWORD state_id, struct wined3d_stateblock *state
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
struct shader_arb_priv *priv = device->fragment_priv;
BOOL use_vshader = use_vs(state);
BOOL use_pshader = use_ps(state);
@ -6548,7 +6549,7 @@ struct arbfp_blit_priv {
GLuint palette_texture;
};
static HRESULT arbfp_blit_alloc(IWineD3DDeviceImpl *device)
static HRESULT arbfp_blit_alloc(struct wined3d_device *device)
{
device->blit_priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct arbfp_blit_priv));
if(!device->blit_priv) {
@ -6559,7 +6560,7 @@ static HRESULT arbfp_blit_alloc(IWineD3DDeviceImpl *device)
}
/* Context activation is done by the caller. */
static void arbfp_blit_free(IWineD3DDeviceImpl *device)
static void arbfp_blit_free(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct arbfp_blit_priv *priv = device->blit_priv;
@ -6886,7 +6887,7 @@ static GLuint gen_p8_shader(struct arbfp_blit_priv *priv,
static void upload_palette(struct wined3d_surface *surface)
{
BYTE table[256][4];
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct arbfp_blit_priv *priv = device->blit_priv;
BOOL colorkey = (surface->CKeyFlags & WINEDDSD_CKSRCBLT) ? TRUE : FALSE;
@ -7216,7 +7217,7 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info, enum win
}
}
HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, struct wined3d_surface *src_surface, const RECT *src_rect,
HRESULT arbfp_blit_surface(struct wined3d_device *device, struct wined3d_surface *src_surface, const RECT *src_rect,
struct wined3d_surface *dst_surface, const RECT *dst_rect_in, enum wined3d_blit_op blit_op, DWORD Filter)
{
struct wined3d_context *context;
@ -7256,7 +7257,7 @@ HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, struct wined3d_surface *s
}
/* Do not call while under the GL lock. */
static HRESULT arbfp_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_surface *dst_surface,
static HRESULT arbfp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
const RECT *dst_rect, const WINED3DCOLORVALUE *color)
{
FIXME("Color filling not implemented by arbfp_blit\n");
@ -7264,7 +7265,7 @@ static HRESULT arbfp_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_
}
/* Do not call while under the GL lock. */
static HRESULT arbfp_blit_depth_fill(IWineD3DDeviceImpl *device,
static HRESULT arbfp_blit_depth_fill(struct wined3d_device *device,
struct wined3d_surface *surface, const RECT *rect, float depth)
{
FIXME("Depth filling not implemented by arbfp_blit.\n");

View File

@ -799,10 +799,10 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], con
static void set_tex_op_atifs(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
IWineD3DDeviceImpl *This = stateblock->device;
struct wined3d_device *device = stateblock->device;
const struct atifs_ffp_desc *desc;
struct ffp_frag_settings settings;
struct atifs_private_data *priv = This->fragment_priv;
struct ffp_frag_settings settings;
struct atifs_private_data *priv = device->fragment_priv;
DWORD mapped_stage;
unsigned int i;
@ -832,8 +832,9 @@ static void set_tex_op_atifs(DWORD state, struct wined3d_stateblock *stateblock,
/* GL_ATI_fragment_shader depends on the GL_TEXTURE_xD enable settings. Update the texture stages
* used by this shader
*/
for(i = 0; i < desc->num_textures_used; i++) {
mapped_stage = This->texUnitMap[i];
for (i = 0; i < desc->num_textures_used; ++i)
{
mapped_stage = device->texUnitMap[i];
if (mapped_stage != WINED3D_UNMAPPED_STAGE)
{
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
@ -890,7 +891,7 @@ static void atifs_apply_pixelshader(DWORD state_id,
struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
BOOL use_vshader = use_vs(state);
context->last_was_pshader = use_ps(state);
@ -1114,7 +1115,7 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen
caps->MaxSimultaneousTextures = 6;
}
static HRESULT atifs_alloc(IWineD3DDeviceImpl *device)
static HRESULT atifs_alloc(struct wined3d_device *device)
{
struct atifs_private_data *priv;
@ -1137,8 +1138,8 @@ static HRESULT atifs_alloc(IWineD3DDeviceImpl *device)
/* Context activation is done by the caller. */
static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *context)
{
IWineD3DDeviceImpl *This = context;
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
struct wined3d_device *device = context;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct atifs_ffp_desc *entry_ati = WINE_RB_ENTRY_VALUE(entry, struct atifs_ffp_desc, parent.entry);
ENTER_GL();
@ -1149,7 +1150,7 @@ static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *context)
}
/* Context activation is done by the caller. */
static void atifs_free(IWineD3DDeviceImpl *device)
static void atifs_free(struct wined3d_device *device)
{
struct atifs_private_data *priv = device->fragment_priv;

View File

@ -322,7 +322,7 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win
static BOOL buffer_find_decl(struct wined3d_buffer *This)
{
IWineD3DDeviceImpl *device = This->resource.device;
struct wined3d_device *device = This->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct wined3d_stream_info *si = &device->strided_streams;
const struct wined3d_state *state = &device->stateBlock->state;
@ -535,7 +535,7 @@ static void buffer_unload(struct wined3d_resource *resource)
if (buffer->buffer_object)
{
IWineD3DDeviceImpl *device = resource->device;
struct wined3d_device *device = resource->device;
struct wined3d_context *context;
context = context_acquire(device, NULL);
@ -765,7 +765,7 @@ static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined
void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
{
DWORD flags = buffer->flags & (WINED3D_BUFFER_NOSYNC | WINED3D_BUFFER_DISCARD);
IWineD3DDeviceImpl *device = buffer->resource.device;
struct wined3d_device *device = buffer->resource.device;
UINT start = 0, end = 0, len = 0, vertices;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@ -1039,7 +1039,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
{
if (count == 1)
{
IWineD3DDeviceImpl *device = buffer->resource.device;
struct wined3d_device *device = buffer->resource.device;
struct wined3d_context *context;
const struct wined3d_gl_info *gl_info;
@ -1143,7 +1143,7 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER) && buffer->buffer_object)
{
IWineD3DDeviceImpl *device = buffer->resource.device;
struct wined3d_device *device = buffer->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@ -1194,7 +1194,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
buffer_unload,
};
static HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
UINT size, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, GLenum bind_hint,
const char *data, void *parent, const struct wined3d_parent_ops *parent_ops)
{
@ -1280,10 +1280,9 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *de
return WINED3D_OK;
}
HRESULT CDECL wined3d_buffer_create(IWineD3DDevice *iface, struct wined3d_buffer_desc *desc, const void *data,
HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, struct wined3d_buffer_desc *desc, const void *data,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_buffer *object;
HRESULT hr;
@ -1315,10 +1314,9 @@ HRESULT CDECL wined3d_buffer_create(IWineD3DDevice *iface, struct wined3d_buffer
return WINED3D_OK;
}
HRESULT CDECL wined3d_buffer_create_vb(IWineD3DDevice *iface, UINT size, DWORD usage, WINED3DPOOL pool,
HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size, DWORD usage, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_buffer *object;
HRESULT hr;
@ -1357,10 +1355,9 @@ HRESULT CDECL wined3d_buffer_create_vb(IWineD3DDevice *iface, UINT size, DWORD u
return WINED3D_OK;
}
HRESULT CDECL wined3d_buffer_create_ib(IWineD3DDevice *iface, UINT size, DWORD usage, WINED3DPOOL pool,
HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size, DWORD usage, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_buffer *object;
HRESULT hr;

View File

@ -119,7 +119,7 @@ static void context_apply_attachment_filter_states(const struct wined3d_context
if (surface->container.type == WINED3D_CONTAINER_TEXTURE)
{
struct wined3d_texture *texture = surface->container.u.texture;
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
BOOL update_minfilter = FALSE;
BOOL update_magfilter = FALSE;
struct gl_texture *gl_tex;
@ -652,7 +652,7 @@ void context_free_event_query(struct wined3d_event_query *query)
typedef void (context_fbo_entry_func_t)(struct wined3d_context *context, struct fbo_entry *entry);
static void context_enum_surface_fbo_entries(IWineD3DDeviceImpl *device,
static void context_enum_surface_fbo_entries(struct wined3d_device *device,
struct wined3d_surface *surface, context_fbo_entry_func_t *callback)
{
UINT i;
@ -1171,7 +1171,7 @@ static void Context_MarkStateDirty(struct wined3d_context *context, DWORD state,
}
/* This function takes care of WineD3D pixel format selection. */
static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
static int WineD3D_ChoosePixelFormat(struct wined3d_device *device, HDC hdc,
const struct wined3d_format *color_format, const struct wined3d_format *ds_format,
BOOL auxBuffers, int numSamples, BOOL findCompatible)
{
@ -1204,7 +1204,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
};
int i = 0;
int nCfgs = This->adapter->nCfgs;
int nCfgs = device->adapter->nCfgs;
TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, findCompatible=%d\n",
debug_d3dformat(color_format->id), debug_d3dformat(ds_format->id),
@ -1223,7 +1223,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
{
for (i = 0; i < nCfgs; ++i)
{
const struct wined3d_pixel_format *cfg = &This->adapter->cfgs[i];
const struct wined3d_pixel_format *cfg = &device->adapter->cfgs[i];
BOOL exactDepthMatch = TRUE;
/* For now only accept RGBA formats. Perhaps some day we will
@ -1273,7 +1273,8 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
* even when we don't need stencil because it could affect performance EXCEPT
* on cards which don't offer depth formats without stencil like the i915 drivers
* on Linux. */
if(stencilBits != cfg->stencilSize && !(This->adapter->brokenStencil && stencilBits <= cfg->stencilSize))
if (stencilBits != cfg->stencilSize
&& !(device->adapter->brokenStencil && stencilBits <= cfg->stencilSize))
continue;
/* Check multisampling support */
@ -1336,7 +1337,7 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
struct wined3d_surface *target, const struct wined3d_format *ds_format)
{
IWineD3DDeviceImpl *device = swapchain->device;
struct wined3d_device *device = swapchain->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct wined3d_format *color_format;
struct wined3d_context *ret;
@ -1669,7 +1670,7 @@ out:
}
/* Do not call while under the GL lock. */
void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context)
void context_destroy(struct wined3d_device *device, struct wined3d_context *context)
{
BOOL destroy;
@ -1691,7 +1692,7 @@ void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context)
HeapFree(GetProcessHeap(), 0, context->blit_targets);
HeapFree(GetProcessHeap(), 0, context->vshader_const_dirty);
HeapFree(GetProcessHeap(), 0, context->pshader_const_dirty);
device_context_remove(This, context);
device_context_remove(device, context);
if (destroy) HeapFree(GetProcessHeap(), 0, context);
}
@ -1724,10 +1725,10 @@ static inline void set_blit_dimension(UINT width, UINT height) {
*
*****************************************************************************/
/* Context activation is done by the caller. */
static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *context)
static void SetupForBlit(struct wined3d_device *device, struct wined3d_context *context)
{
int i;
const struct StateEntry *StateTable = This->StateTable;
const struct StateEntry *StateTable = device->StateTable;
const struct wined3d_gl_info *gl_info = context->gl_info;
UINT width = context->current_rt->resource.width;
UINT height = context->current_rt->resource.height;
@ -1754,7 +1755,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte
/* Disable shaders */
ENTER_GL();
This->shader_backend->shader_select(context, FALSE, FALSE);
device->shader_backend->shader_select(context, FALSE, FALSE);
LEAVE_GL();
Context_MarkStateDirty(context, STATE_VSHADER, StateTable);
@ -1775,7 +1776,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte
*/
for (i = gl_info->limits.textures - 1; i > 0 ; --i)
{
sampler = This->rev_tex_unit_map[i];
sampler = device->rev_tex_unit_map[i];
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
checkGLcall("glActiveTextureARB");
@ -1808,7 +1809,7 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
checkGLcall("glActiveTextureARB");
sampler = This->rev_tex_unit_map[0];
sampler = device->rev_tex_unit_map[0];
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
{
@ -1919,11 +1920,11 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte
Context_MarkStateDirty(context, STATE_VIEWPORT, StateTable);
Context_MarkStateDirty(context, STATE_TRANSFORM(WINED3DTS_PROJECTION), StateTable);
This->frag_pipe->enable_extension(FALSE);
device->frag_pipe->enable_extension(FALSE);
}
/* Do not call while under the GL lock. */
static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, struct wined3d_surface *target)
static struct wined3d_context *FindContext(struct wined3d_device *device, struct wined3d_surface *target)
{
struct wined3d_context *current_context = context_get_current();
struct wined3d_context *context;
@ -1934,13 +1935,13 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, struct wine
{
if (current_context
&& current_context->current_rt
&& current_context->swapchain->device == This)
&& current_context->swapchain->device == device)
{
target = current_context->current_rt;
}
else
{
struct wined3d_swapchain *swapchain = This->swapchains[0];
struct wined3d_swapchain *swapchain = device->swapchains[0];
if (swapchain->back_buffers) target = swapchain->back_buffers[0];
else target = swapchain->front_buffer;
}
@ -1964,10 +1965,10 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, struct wine
/* Stay with the current context if possible. Otherwise use the
* context for the primary swapchain. */
if (current_context && current_context->swapchain->device == This)
if (current_context && current_context->swapchain->device == device)
context = current_context;
else
context = swapchain_get_context(This->swapchains[0]);
context = swapchain_get_context(device->swapchains[0]);
}
context_update_window(context);
@ -2068,7 +2069,7 @@ static BOOL match_depth_stencil_format(const struct wined3d_format *existing,
}
/* The caller provides a context */
static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device,
static void context_validate_onscreen_formats(struct wined3d_device *device,
struct wined3d_context *context, struct wined3d_surface *depth_stencil)
{
/* Onscreen surfaces are always in a swapchain */
@ -2089,7 +2090,7 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device,
}
/* Context activation is done by the caller. */
void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImpl *device)
void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device)
{
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
@ -2148,7 +2149,7 @@ static BOOL context_validate_rt_config(UINT rt_count,
}
/* Context activation is done by the caller. */
BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceImpl *device,
BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device,
UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil)
{
const struct StateEntry *state_table = device->StateTable;
@ -2220,7 +2221,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
}
/* Context activation is done by the caller. */
BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImpl *device)
BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device)
{
const struct StateEntry *state_table = device->StateTable;
unsigned int i;
@ -2292,7 +2293,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
return TRUE;
}
static void context_setup_target(IWineD3DDeviceImpl *device,
static void context_setup_target(struct wined3d_device *device,
struct wined3d_context *context, struct wined3d_surface *target)
{
BOOL old_render_offscreen = context->render_offscreen, render_offscreen;
@ -2358,7 +2359,7 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
}
/* Do not call while under the GL lock. */
struct wined3d_context *context_acquire(IWineD3DDeviceImpl *device, struct wined3d_surface *target)
struct wined3d_context *context_acquire(struct wined3d_device *device, struct wined3d_surface *target)
{
struct wined3d_context *current_context = context_get_current();
struct wined3d_context *context;

File diff suppressed because it is too large Load Diff

View File

@ -329,7 +329,7 @@ fail:
}
/* Adjust the amount of used texture memory */
unsigned int WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *device, int glram)
unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram)
{
struct wined3d_adapter *adapter = device->adapter;
@ -4850,9 +4850,9 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
}
HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, WINED3DDEVTYPE device_type,
HWND focus_window, DWORD flags, IWineD3DDeviceParent *device_parent, IWineD3DDevice **device)
HWND focus_window, DWORD flags, IWineD3DDeviceParent *device_parent, struct wined3d_device **device)
{
IWineD3DDeviceImpl *object;
struct wined3d_device *object;
HRESULT hr;
TRACE("wined3d %p, adapter_idx %u, device_type %#x, focus_window %p, flags %#x, device_parent %p, device %p.\n",
@ -4879,7 +4879,7 @@ HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, W
}
TRACE("Created device %p.\n", object);
*device = (IWineD3DDevice *)object;
*device = object;
IWineD3DDeviceParent_WineD3DDeviceCreated(device_parent, *device);

View File

@ -55,7 +55,7 @@ static void drawStridedFast(GLenum primitive_type, UINT count, UINT idx_size, co
*/
/* GL locking is done by the caller */
static void drawStridedSlow(IWineD3DDeviceImpl *device, const struct wined3d_context *context,
static void drawStridedSlow(struct wined3d_device *device, const struct wined3d_context *context,
const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType,
const void *idxData, UINT idxSize, UINT startIdx)
{
@ -558,7 +558,7 @@ static void remove_vbos(const struct wined3d_gl_info *gl_info,
}
/* Routine common to the draw primitive and draw indexed primitive routines */
void drawPrimitive(IWineD3DDeviceImpl *device, UINT index_count, UINT StartIdx, UINT idxSize, const void *idxData)
void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartIdx, UINT idxSize, const void *idxData)
{
const struct wined3d_state *state = &device->stateBlock->state;
struct wined3d_context *context;
@ -768,8 +768,8 @@ static void normalize_normal(float *n) {
* responsible of taking care that either the gl states are restored, or the context activated
* for drawing to reset the lastWasBlit flag.
*/
HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This,
struct WineD3DRectPatch *patch) {
HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch *patch)
{
unsigned int i, j, num_quads, out_vertex_size, buffer_size, d3d_out_vertex_size;
float max_x = 0.0f, max_y = 0.0f, max_z = 0.0f, neg_z = 0.0f;
struct wined3d_stream_info stream_info;

View File

@ -737,7 +737,7 @@ static void shader_glsl_load_constants(const struct wined3d_context *context,
char usePixelShader, char useVertexShader)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
IWineD3DDeviceImpl *device = context->swapchain->device;
struct wined3d_device *device = context->swapchain->device;
struct wined3d_stateblock *stateBlock = device->stateBlock;
struct shader_glsl_priv *priv = device->shader_priv;
float position_fixup[4];
@ -871,7 +871,7 @@ static inline void update_heap_entry(struct constant_heap *heap, unsigned int id
positions[idx] = heap_idx;
}
static void shader_glsl_update_float_vertex_constants(IWineD3DDeviceImpl *device, UINT start, UINT count)
static void shader_glsl_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count)
{
struct shader_glsl_priv *priv = device->shader_priv;
struct constant_heap *heap = &priv->vconst_heap;
@ -886,7 +886,7 @@ static void shader_glsl_update_float_vertex_constants(IWineD3DDeviceImpl *device
}
}
static void shader_glsl_update_float_pixel_constants(IWineD3DDeviceImpl *device, UINT start, UINT count)
static void shader_glsl_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count)
{
struct shader_glsl_priv *priv = device->shader_priv;
struct constant_heap *heap = &priv->pconst_heap;
@ -917,7 +917,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader,
const struct wined3d_shader_reg_maps *reg_maps, struct shader_glsl_ctx_priv *ctx_priv)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_state *state = &device->stateBlock->state;
const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args;
const struct wined3d_gl_info *gl_info = context->gl_info;
@ -3036,7 +3036,7 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins)
static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major,
ins->ctx->reg_maps->shader_version.minor);
glsl_sample_function_t sample_function;
@ -3126,7 +3126,7 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins)
static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
glsl_sample_function_t sample_function;
glsl_src_param_t coord_param, dx_param, dy_param;
@ -3159,7 +3159,7 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins)
static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins)
{
struct wined3d_shader *shader = ins->ctx->shader;
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = ins->ctx->gl_info;
glsl_sample_function_t sample_function;
glsl_src_param_t coord_param, lod_param;
@ -4294,7 +4294,7 @@ static GLhandleARB find_glsl_vshader(const struct wined3d_context *context,
/* GL locking is done by the caller */
static void set_glsl_shader_program(const struct wined3d_context *context,
IWineD3DDeviceImpl *device, BOOL use_ps, BOOL use_vs)
struct wined3d_device *device, BOOL use_ps, BOOL use_vs)
{
const struct wined3d_state *state = &device->stateBlock->state;
struct wined3d_shader *vshader = use_vs ? state->vertex_shader : NULL;
@ -4594,7 +4594,7 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info,
static void shader_glsl_select(const struct wined3d_context *context, BOOL usePS, BOOL useVS)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
IWineD3DDeviceImpl *device = context->swapchain->device;
struct wined3d_device *device = context->swapchain->device;
struct shader_glsl_priv *priv = device->shader_priv;
GLhandleARB program_id = 0;
GLenum old_vertex_color_clamp, current_vertex_color_clamp;
@ -4677,10 +4677,10 @@ static void shader_glsl_deselect_depth_blt(void *shader_priv, const struct wined
static void shader_glsl_destroy(struct wined3d_shader *shader)
{
const struct list *linked_programs;
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
struct shader_glsl_priv *priv = device->shader_priv;
const struct wined3d_gl_info *gl_info;
const struct list *linked_programs;
struct wined3d_context *context;
char pshader = shader_is_pshader_version(shader->reg_maps.shader_version.type);
@ -4833,7 +4833,7 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions =
glsl_program_key_compare,
};
static HRESULT shader_glsl_alloc(IWineD3DDeviceImpl *device)
static HRESULT shader_glsl_alloc(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv));
@ -4886,7 +4886,7 @@ fail:
}
/* Context activation is done by the caller. */
static void shader_glsl_free(IWineD3DDeviceImpl *device)
static void shader_glsl_free(struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct shader_glsl_priv *priv = device->shader_priv;

View File

@ -692,9 +692,9 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
caps->MaxSimultaneousTextures = gl_info->limits.textures;
}
static HRESULT nvrc_fragment_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
static HRESULT nvrc_fragment_alloc(struct wined3d_device *device) { return WINED3D_OK; }
/* Context activation is done by the caller. */
static void nvrc_fragment_free(IWineD3DDeviceImpl *device) {}
static void nvrc_fragment_free(struct wined3d_device *device) {}
/* Two fixed function pipeline implementations using GL_NV_register_combiners and
* GL_NV_texture_shader. The nvts_fragment_pipeline assumes that both extensions

View File

@ -158,7 +158,7 @@ void * CDECL wined3d_palette_get_parent(const struct wined3d_palette *palette)
return palette->parent;
}
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, IWineD3DDeviceImpl *device,
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device,
DWORD flags, const PALETTEENTRY *entries, void *parent)
{
HRESULT hr;
@ -187,10 +187,9 @@ static HRESULT wined3d_palette_init(struct wined3d_palette *palette, IWineD3DDev
return WINED3D_OK;
}
HRESULT CDECL wined3d_palette_create(IWineD3DDevice *iface, DWORD flags,
HRESULT CDECL wined3d_palette_create(struct wined3d_device *device, DWORD flags,
const PALETTEENTRY *entries, void *parent, struct wined3d_palette **palette)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_palette *object;
HRESULT hr;

View File

@ -37,7 +37,8 @@ void wined3d_event_query_destroy(struct wined3d_event_query *query)
HeapFree(GetProcessHeap(), 0, query);
}
static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, IWineD3DDeviceImpl *device)
static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query,
struct wined3d_device *device)
{
struct wined3d_context *context;
const struct wined3d_gl_info *gl_info;
@ -111,7 +112,8 @@ static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_e
return ret;
}
enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, IWineD3DDeviceImpl *device)
enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query,
struct wined3d_device *device)
{
struct wined3d_context *context;
const struct wined3d_gl_info *gl_info;
@ -179,7 +181,7 @@ enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_
return ret;
}
void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device)
void wined3d_event_query_issue(struct wined3d_event_query *query, struct wined3d_device *device)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@ -297,7 +299,7 @@ static HRESULT wined3d_occlusion_query_ops_get_data(struct wined3d_query *query,
void *pData, DWORD dwSize, DWORD flags)
{
struct wined3d_occlusion_query *oq = query->extendedData;
IWineD3DDeviceImpl *device = query->device;
struct wined3d_device *device = query->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_context *context;
DWORD* data = pData;
@ -449,7 +451,7 @@ static HRESULT wined3d_event_query_ops_issue(struct wined3d_query *query, DWORD
static HRESULT wined3d_occlusion_query_ops_issue(struct wined3d_query *query, DWORD flags)
{
IWineD3DDeviceImpl *device = query->device;
struct wined3d_device *device = query->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
TRACE("query %p, flags %#x.\n", query, flags);
@ -547,7 +549,7 @@ static const struct wined3d_query_ops occlusion_query_ops =
wined3d_occlusion_query_ops_issue,
};
static HRESULT query_init(struct wined3d_query *query, IWineD3DDeviceImpl *device, WINED3DQUERYTYPE type)
static HRESULT query_init(struct wined3d_query *query, struct wined3d_device *device, WINED3DQUERYTYPE type)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -616,10 +618,9 @@ static HRESULT query_init(struct wined3d_query *query, IWineD3DDeviceImpl *devic
return WINED3D_OK;
}
HRESULT CDECL wined3d_query_create(IWineD3DDevice *iface,
HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
WINED3DQUERYTYPE type, struct wined3d_query **query)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_query *object;
HRESULT hr;

View File

@ -65,7 +65,7 @@ static DWORD resource_access_from_pool(WINED3DPOOL pool)
}
}
HRESULT resource_init(struct wined3d_resource *resource, IWineD3DDeviceImpl *device,
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format,
WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality,
DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size,

View File

@ -298,7 +298,7 @@ int shader_addline(struct wined3d_shader_buffer *buffer, const char *format, ...
return ret;
}
static void shader_init(struct wined3d_shader *shader, IWineD3DDeviceImpl *device,
static void shader_init(struct wined3d_shader *shader, struct wined3d_device *device,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
shader->ref = 1;
@ -1162,7 +1162,7 @@ void shader_dump_src_param(const struct wined3d_shader_src_param *param,
void shader_generate_main(struct wined3d_shader *shader, struct wined3d_shader_buffer *buffer,
const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_shader_frontend *fe = shader->frontend;
void *fe_data = shader->frontend_data;
struct wined3d_shader_src_param dst_rel_addr[2];
@ -1489,14 +1489,14 @@ static void shader_none_select(const struct wined3d_context *context, BOOL usePS
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(void *shader_priv, const struct wined3d_gl_info *gl_info) {}
static void shader_none_update_float_vertex_constants(IWineD3DDeviceImpl *device, UINT start, UINT count) {}
static void shader_none_update_float_pixel_constants(IWineD3DDeviceImpl *device, UINT start, UINT count) {}
static void shader_none_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) {}
static void shader_none_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count) {}
static void shader_none_load_constants(const struct wined3d_context *context, char usePS, char useVS) {}
static void shader_none_load_np2fixup_constants(void *shader_priv,
const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) {}
static void shader_none_destroy(struct wined3d_shader *shader) {}
static HRESULT shader_none_alloc(IWineD3DDeviceImpl *device) {return WINED3D_OK;}
static void shader_none_free(IWineD3DDeviceImpl *device) {}
static HRESULT shader_none_alloc(struct wined3d_device *device) {return WINED3D_OK;}
static void shader_none_free(struct wined3d_device *device) {}
static BOOL shader_none_dirty_const(void) {return FALSE;}
static void shader_none_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps)
@ -1725,7 +1725,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
{
DWORD shader_version = WINED3D_SHADER_VERSION(shader->reg_maps.shader_version.major,
shader->reg_maps.shader_version.minor);
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
shader->limits.texcoord = 0;
shader->limits.attributes = 16;
@ -1795,7 +1795,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
}
}
static HRESULT vertexshader_init(struct wined3d_shader *shader, IWineD3DDeviceImpl *device,
static HRESULT vertexshader_init(struct wined3d_shader *shader, struct wined3d_device *device,
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
@ -1844,7 +1844,7 @@ static HRESULT vertexshader_init(struct wined3d_shader *shader, IWineD3DDeviceIm
return WINED3D_OK;
}
static HRESULT geometryshader_init(struct wined3d_shader *shader, IWineD3DDeviceImpl *device,
static HRESULT geometryshader_init(struct wined3d_shader *shader, struct wined3d_device *device,
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
@ -1867,7 +1867,7 @@ static HRESULT geometryshader_init(struct wined3d_shader *shader, IWineD3DDevice
void find_ps_compile_args(const struct wined3d_state *state,
const struct wined3d_shader *shader, struct ps_compile_args *args)
{
IWineD3DDeviceImpl *device = shader->device;
struct wined3d_device *device = shader->device;
const struct wined3d_texture *texture;
UINT i;
@ -2050,7 +2050,7 @@ static void pixelshader_set_limits(struct wined3d_shader *shader)
}
}
static HRESULT pixelshader_init(struct wined3d_shader *shader, IWineD3DDeviceImpl *device,
static HRESULT pixelshader_init(struct wined3d_shader *shader, struct wined3d_device *device,
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
@ -2160,11 +2160,10 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struc
}
}
HRESULT CDECL wined3d_shader_create_gs(IWineD3DDevice *iface, const DWORD *byte_code,
HRESULT CDECL wined3d_shader_create_gs(struct wined3d_device *device, const DWORD *byte_code,
const struct wined3d_shader_signature *output_signature, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_shader *object;
HRESULT hr;
@ -2192,11 +2191,10 @@ HRESULT CDECL wined3d_shader_create_gs(IWineD3DDevice *iface, const DWORD *byte_
return WINED3D_OK;
}
HRESULT CDECL wined3d_shader_create_ps(IWineD3DDevice *iface, const DWORD *byte_code,
HRESULT CDECL wined3d_shader_create_ps(struct wined3d_device *device, const DWORD *byte_code,
const struct wined3d_shader_signature *output_signature, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_shader *object;
HRESULT hr;
@ -2227,11 +2225,10 @@ HRESULT CDECL wined3d_shader_create_ps(IWineD3DDevice *iface, const DWORD *byte_
return WINED3D_OK;
}
HRESULT CDECL wined3d_shader_create_vs(IWineD3DDevice *iface, const DWORD *byte_code,
HRESULT CDECL wined3d_shader_create_vs(struct wined3d_device *device, const DWORD *byte_code,
const struct wined3d_shader_signature *output_signature, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_shader *object;
HRESULT hr;

View File

@ -1178,7 +1178,7 @@ void state_fogdensity(DWORD state, struct wined3d_stateblock *stateblock, struct
static void state_colormat(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
GLenum Parm = 0;
/* Depends on the decoded vertex declaration to read the existence of diffuse data.
@ -3476,7 +3476,7 @@ static void tex_coordindex(DWORD state, struct wined3d_stateblock *stateblock, s
static void shaderconstant(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
/* Vertex and pixel shader states will call a shader upload, don't do anything as long one of them
* has an update pending
@ -3538,7 +3538,7 @@ static void sampler_texmatrix(DWORD state, struct wined3d_stateblock *stateblock
static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
DWORD sampler = state_id - STATE_SAMPLER(0);
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
DWORD mapped_stage = device->texUnitMap[sampler];
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
@ -3618,7 +3618,7 @@ static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struc
void apply_pixelshader(DWORD state_id, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
const struct wined3d_state *state = &stateblock->state;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
BOOL use_vshader = use_vs(state);
BOOL use_pshader = use_ps(state);
unsigned int i;
@ -4477,7 +4477,7 @@ static void loadVertexData(const struct wined3d_context *context, struct wined3d
static void streamsrc(DWORD state, struct wined3d_stateblock *stateblock, struct wined3d_context *context)
{
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
BOOL load_numbered = use_vs(&stateblock->state) && !device->useDrawStridedSlow;
BOOL load_named = !use_vs(&stateblock->state) && !device->useDrawStridedSlow;
@ -4511,18 +4511,17 @@ static void vertexdeclaration(DWORD state_id, struct wined3d_stateblock *statebl
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_state *state = &stateblock->state;
struct wined3d_device *device = stateblock->device;
BOOL useVertexShaderFunction = use_vs(state);
BOOL usePixelShaderFunction = use_ps(state);
BOOL updateFog = FALSE;
IWineD3DDeviceImpl *device = stateblock->device;
BOOL transformed;
BOOL wasrhw = context->last_was_rhw;
unsigned int i;
transformed = device->strided_streams.position_transformed;
if(transformed != context->last_was_rhw && !useVertexShaderFunction) {
if (transformed != context->last_was_rhw && !useVertexShaderFunction)
updateFog = TRUE;
}
if (transformed) {
context->last_was_rhw = TRUE;
@ -5622,8 +5621,8 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct
caps->MaxSimultaneousTextures = gl_info->limits.textures;
}
static HRESULT ffp_fragment_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
static void ffp_fragment_free(IWineD3DDeviceImpl *device) {}
static HRESULT ffp_fragment_alloc(struct wined3d_device *device) { return WINED3D_OK; }
static void ffp_fragment_free(struct wined3d_device *device) {}
static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup)
{
if (TRACE_ON(d3d))

View File

@ -193,7 +193,7 @@ static const DWORD vertex_states_sampler[] =
*/
static HRESULT stateblock_allocate_shader_constants(struct wined3d_stateblock *object)
{
IWineD3DDeviceImpl *device = object->device;
struct wined3d_device *device = object->device;
/* Allocate space for floating point constants */
object->state.ps_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
@ -329,7 +329,7 @@ static void stateblock_savedstates_set_vertex(SAVEDSTATES *states, const DWORD n
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
{
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
unsigned int i, j;
for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i)
@ -885,7 +885,7 @@ HRESULT CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
return WINED3D_OK;
}
static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *state)
static void apply_lights(struct wined3d_device *device, const struct wined3d_state *state)
{
UINT i;
@ -905,7 +905,7 @@ static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *sta
HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock)
{
IWineD3DDevice *device = (IWineD3DDevice *)stateblock->device;
struct wined3d_device *device = stateblock->device;
unsigned int i;
DWORD map;
@ -1071,7 +1071,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
{
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_state *state = &stateblock->state;
union {
@ -1320,7 +1320,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
}
static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type)
struct wined3d_device *device, WINED3DSTATEBLOCKTYPE type)
{
unsigned int i;
HRESULT hr;
@ -1372,10 +1372,9 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
return WINED3D_OK;
}
HRESULT CDECL wined3d_stateblock_create(IWineD3DDevice *iface,
HRESULT CDECL wined3d_stateblock_create(struct wined3d_device *device,
WINED3DSTATEBLOCKTYPE type, struct wined3d_stateblock **stateblock)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_stateblock *object;
HRESULT hr;

View File

@ -496,7 +496,7 @@ static HRESULT surface_create_dib_section(struct wined3d_surface *surface)
static void surface_prepare_system_memory(struct wined3d_surface *surface)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
TRACE("surface %p.\n", surface);
@ -585,7 +585,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
static void surface_bind_and_dirtify(struct wined3d_surface *surface,
const struct wined3d_gl_info *gl_info, BOOL srgb)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
DWORD active_sampler;
GLint active_texture;
@ -839,7 +839,7 @@ static void surface_preload(struct wined3d_surface *surface)
static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const RECT *pass_rect = rect;
TRACE("surface %p, rect %s, flags %#x.\n",
@ -915,7 +915,7 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD
static void surface_unmap(struct wined3d_surface *surface)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
BOOL fullsurface;
TRACE("surface %p.\n", surface);
@ -1080,7 +1080,7 @@ static BOOL surface_is_full_rect(struct wined3d_surface *surface, const RECT *r)
return TRUE;
}
static void wined3d_surface_depth_blt_fbo(IWineD3DDeviceImpl *device, struct wined3d_surface *src_surface,
static void wined3d_surface_depth_blt_fbo(struct wined3d_device *device, struct wined3d_surface *src_surface,
const RECT *src_rect, struct wined3d_surface *dst_surface, const RECT *dst_rect)
{
const struct wined3d_gl_info *gl_info;
@ -1248,7 +1248,7 @@ static BOOL surface_convert_depth_to_float(struct wined3d_surface *surface, DWOR
static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const RECT *rect, float depth)
{
const struct wined3d_resource *resource = &surface->resource;
IWineD3DDeviceImpl *device = resource->device;
struct wined3d_device *device = resource->device;
const struct blit_shader *blitter;
blitter = wined3d_select_blitter(&device->adapter->gl_info, WINED3D_BLIT_OP_DEPTH_FILL,
@ -1265,7 +1265,7 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const
static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, const RECT *src_rect,
struct wined3d_surface *dst_surface, const RECT *dst_rect)
{
IWineD3DDeviceImpl *device = src_surface->resource.device;
struct wined3d_device *device = src_surface->resource.device;
if (!fbo_blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_DEPTH_BLIT,
src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
@ -1286,7 +1286,7 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter)
{
IWineD3DDeviceImpl *device = dst_surface->resource.device;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n",
@ -1393,7 +1393,7 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
static HRESULT surface_bltfast(struct wined3d_surface *dst_surface, DWORD dst_x, DWORD dst_y,
struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD trans)
{
IWineD3DDeviceImpl *device = dst_surface->resource.device;
struct wined3d_device *device = dst_surface->resource.device;
TRACE("dst_surface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n",
dst_surface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect_in), trans);
@ -1529,7 +1529,7 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win
static void surface_unload(struct wined3d_resource *resource)
{
struct wined3d_surface *surface = surface_from_resource(resource);
IWineD3DDeviceImpl *device = resource->device;
struct wined3d_device *device = resource->device;
const struct wined3d_gl_info *gl_info;
renderbuffer_entry_t *entry, *entry2;
struct wined3d_context *context;
@ -1985,7 +1985,7 @@ void surface_bind(struct wined3d_surface *surface, const struct wined3d_gl_info
}
/* This function checks if the primary render target uses the 8bit paletted format. */
static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device)
static BOOL primary_render_target_is_p8(struct wined3d_device *device)
{
if (device->render_targets && device->render_targets[0])
{
@ -2227,7 +2227,7 @@ static void surface_upload_data(struct wined3d_surface *surface, const struct wi
if (gl_info->quirks & WINED3D_QUIRK_FBO_TEX_UPDATE)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
unsigned int i;
for (i = 0; i < device->context_count; ++i)
@ -2454,7 +2454,7 @@ static BOOL surface_convert_color_to_float(struct wined3d_surface *surface,
DWORD color, WINED3DCOLORVALUE *float_color)
{
const struct wined3d_format *format = surface->resource.format;
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
switch (format->id)
{
@ -3304,7 +3304,7 @@ static struct wined3d_surface *surface_convert_format(struct wined3d_surface *so
return NULL;
}
wined3d_surface_create((IWineD3DDevice *)source->resource.device, source->resource.width,
wined3d_surface_create(source->resource.device, source->resource.width,
source->resource.height, to_fmt, TRUE /* lockable */, TRUE /* discard */, 0 /* level */,
0 /* usage */, WINED3DPOOL_SCRATCH, WINED3DMULTISAMPLE_NONE /* TODO: Multisampled conversion */,
0 /* MultiSampleQuality */, source->surface_type, NULL /* parent */, &wined3d_null_parent_ops, &ret);
@ -3633,7 +3633,7 @@ HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined
/* Do not call while under the GL lock. */
void surface_internal_preload(struct wined3d_surface *surface, enum WINED3DSRGB srgb)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
TRACE("iface %p, srgb %#x.\n", surface, srgb);
@ -3708,7 +3708,7 @@ BOOL surface_init_sysmem(struct wined3d_surface *surface)
/* Read the framebuffer back into the surface */
static void read_from_framebuffer(struct wined3d_surface *surface, const RECT *rect, void *dest, UINT pitch)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
BYTE *mem;
@ -3965,7 +3965,7 @@ static void read_from_framebuffer(struct wined3d_surface *surface, const RECT *r
/* Read the framebuffer contents into a texture */
static void read_from_framebuffer_texture(struct wined3d_surface *surface, BOOL srgb)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@ -4049,7 +4049,7 @@ void surface_prepare_texture(struct wined3d_surface *surface, const struct wined
static void flush_to_framebuffer_drawpixels(struct wined3d_surface *surface,
const RECT *rect, GLenum fmt, GLenum type, UINT bpp, const BYTE *mem)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
UINT pitch = wined3d_surface_get_pitch(surface);
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@ -4125,7 +4125,7 @@ HRESULT d3dfmt_get_conv(struct wined3d_surface *surface, BOOL need_alpha_ck,
BOOL use_texturing, struct wined3d_format *format, CONVERT_TYPES *convert)
{
BOOL colorkey_active = need_alpha_ck && (surface->CKeyFlags & WINEDDSD_CKSRCBLT);
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
BOOL blit_supported = FALSE;
@ -4237,7 +4237,7 @@ HRESULT d3dfmt_get_conv(struct wined3d_surface *surface, BOOL need_alpha_ck,
void d3dfmt_p8_init_palette(struct wined3d_surface *surface, BYTE table[256][4], BOOL colorkey)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
struct wined3d_palette *pal = surface->palette;
BOOL index_in_alpha = FALSE;
unsigned int i;
@ -4461,7 +4461,7 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI
BOOL palette9_changed(struct wined3d_surface *surface)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
if (surface->palette || (surface->resource.format->id != WINED3DFMT_P8_UINT
&& surface->resource.format->id != WINED3DFMT_P8_UINT_A8_UNORM))
@ -4573,7 +4573,7 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter)
{
IWineD3DDeviceImpl *device = dst_surface->resource.device;
struct wined3d_device *device = dst_surface->resource.device;
float xrel, yrel;
UINT row;
struct wined3d_context *context;
@ -4685,7 +4685,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc
static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, struct wined3d_surface *src_surface,
const RECT *src_rect, const RECT *dst_rect_in, WINED3DTEXTUREFILTERTYPE Filter)
{
IWineD3DDeviceImpl *device = dst_surface->resource.device;
struct wined3d_device *device = dst_surface->resource.device;
struct wined3d_swapchain *src_swapchain = NULL;
GLuint src, backup = 0;
float left, right, top, bottom; /* Texture coordinates */
@ -4994,7 +4994,7 @@ void surface_translate_drawable_coords(struct wined3d_surface *surface, HWND win
/* blit between surface locations. onscreen on different swapchains is not supported.
* depth / stencil is not supported. */
static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILTERTYPE filter,
static void surface_blt_fbo(struct wined3d_device *device, const WINED3DTEXTUREFILTERTYPE filter,
struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect_in)
{
@ -5121,7 +5121,7 @@ static void surface_blt_fbo(IWineD3DDeviceImpl *device, const WINED3DTEXTUREFILT
context_release(context);
}
static void surface_blt_to_drawable(IWineD3DDeviceImpl *device,
static void surface_blt_to_drawable(struct wined3d_device *device,
WINED3DTEXTUREFILTERTYPE filter, BOOL color_key,
struct wined3d_surface *src_surface, const RECT *src_rect_in,
struct wined3d_surface *dst_surface, const RECT *dst_rect_in)
@ -5193,7 +5193,7 @@ static void surface_blt_to_drawable(IWineD3DDeviceImpl *device,
/* Do not call while under the GL lock. */
HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const WINED3DCOLORVALUE *color)
{
IWineD3DDeviceImpl *device = s->resource.device;
struct wined3d_device *device = s->resource.device;
const struct blit_shader *blitter;
blitter = wined3d_select_blitter(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_FILL,
@ -5212,7 +5212,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
struct wined3d_surface *src_surface, const RECT *SrcRect, DWORD flags, const WINEDDBLTFX *DDBltFx,
WINED3DTEXTUREFILTERTYPE Filter)
{
IWineD3DDeviceImpl *device = dst_surface->resource.device;
struct wined3d_device *device = dst_surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_swapchain *srcSwapchain = NULL, *dstSwapchain = NULL;
RECT dst_rect, src_rect;
@ -5555,7 +5555,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
static void surface_depth_blt(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
GLuint texture, GLsizei w, GLsizei h, GLenum target)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
GLint compare_mode = GL_NONE;
struct blt_info info;
GLint old_binding = 0;
@ -5624,7 +5624,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
/* Context activation is done by the caller. */
void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = context->gl_info;
GLsizei w, h;
@ -5866,7 +5866,7 @@ static DWORD resource_access_from_location(DWORD location)
HRESULT surface_load_location(struct wined3d_surface *surface, DWORD flag, const RECT *rect)
{
IWineD3DDeviceImpl *device = surface->resource.device;
struct wined3d_device *device = surface->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
BOOL drawable_read_ok = surface_is_offscreen(surface);
struct wined3d_format format;
@ -6212,9 +6212,9 @@ BOOL surface_is_offscreen(struct wined3d_surface *surface)
return swapchain->render_to_fbo;
}
static HRESULT ffp_blit_alloc(IWineD3DDeviceImpl *device) { return WINED3D_OK; }
static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
/* Context activation is done by the caller. */
static void ffp_blit_free(IWineD3DDeviceImpl *device) { }
static void ffp_blit_free(struct wined3d_device *device) { }
/* This function is used in case of 8bit paletted textures using GL_EXT_paletted_texture */
/* Context activation is done by the caller. */
@ -6325,7 +6325,7 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined
}
/* Do not call while under the GL lock. */
static HRESULT ffp_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_surface *dst_surface,
static HRESULT ffp_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
const RECT *dst_rect, const WINED3DCOLORVALUE *color)
{
const RECT draw_rect = {0, 0, dst_surface->resource.width, dst_surface->resource.height};
@ -6335,7 +6335,7 @@ static HRESULT ffp_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_su
}
/* Do not call while under the GL lock. */
static HRESULT ffp_blit_depth_fill(IWineD3DDeviceImpl *device,
static HRESULT ffp_blit_depth_fill(struct wined3d_device *device,
struct wined3d_surface *surface, const RECT *rect, float depth)
{
const RECT draw_rect = {0, 0, surface->resource.width, surface->resource.height};
@ -6354,13 +6354,13 @@ const struct blit_shader ffp_blit = {
ffp_blit_depth_fill,
};
static HRESULT cpu_blit_alloc(IWineD3DDeviceImpl *device)
static HRESULT cpu_blit_alloc(struct wined3d_device *device)
{
return WINED3D_OK;
}
/* Context activation is done by the caller. */
static void cpu_blit_free(IWineD3DDeviceImpl *device)
static void cpu_blit_free(struct wined3d_device *device)
{
}
@ -7295,7 +7295,7 @@ error:
}
/* Do not call while under the GL lock. */
static HRESULT cpu_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_surface *dst_surface,
static HRESULT cpu_blit_color_fill(struct wined3d_device *device, struct wined3d_surface *dst_surface,
const RECT *dst_rect, const WINED3DCOLORVALUE *color)
{
WINEDDBLTFX BltFx;
@ -7308,7 +7308,7 @@ static HRESULT cpu_blit_color_fill(IWineD3DDeviceImpl *device, struct wined3d_su
}
/* Do not call while under the GL lock. */
static HRESULT cpu_blit_depth_fill(IWineD3DDeviceImpl *device,
static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
struct wined3d_surface *surface, const RECT *rect, float depth)
{
FIXME("Depth filling not implemented by cpu_blit.\n");
@ -7327,7 +7327,7 @@ const struct blit_shader cpu_blit = {
static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_type, UINT alignment,
UINT width, UINT height, UINT level, BOOL lockable, BOOL discard, WINED3DMULTISAMPLE_TYPE multisample_type,
UINT multisample_quality, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
UINT multisample_quality, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -7452,12 +7452,11 @@ static HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE sur
return hr;
}
HRESULT CDECL wined3d_surface_create(IWineD3DDevice *iface, UINT width, UINT height,
HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width, UINT height,
enum wined3d_format_id format_id, BOOL lockable, BOOL discard, UINT level, DWORD usage, WINED3DPOOL pool,
WINED3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINED3DSURFTYPE surface_type,
void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_surface **surface)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_surface *object;
HRESULT hr;

View File

@ -228,11 +228,11 @@ HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain
return hr;
}
IWineD3DDevice * CDECL wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain)
struct wined3d_device * CDECL wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain)
{
TRACE("swapchain %p.\n", swapchain);
return (IWineD3DDevice *)swapchain->device;
return swapchain->device;
}
HRESULT CDECL wined3d_swapchain_get_present_parameters(const struct wined3d_swapchain *swapchain,
@ -281,7 +281,7 @@ static void swapchain_blit(struct wined3d_swapchain *swapchain,
struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect)
{
struct wined3d_surface *backbuffer = swapchain->back_buffers[0];
IWineD3DDeviceImpl *device = swapchain->device;
struct wined3d_device *device = swapchain->device;
UINT src_w = src_rect->right - src_rect->left;
UINT src_h = src_rect->bottom - src_rect->top;
GLenum gl_filter;
@ -802,7 +802,7 @@ static const struct wined3d_swapchain_ops swapchain_gdi_ops =
/* Do not call while under the GL lock. */
static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTYPE surface_type,
IWineD3DDeviceImpl *device, WINED3DPRESENT_PARAMETERS *present_parameters,
struct wined3d_device *device, WINED3DPRESENT_PARAMETERS *present_parameters,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_adapter *adapter = device->adapter;
@ -1092,12 +1092,11 @@ err:
}
/* Do not call while under the GL lock. */
HRESULT CDECL wined3d_swapchain_create(IWineD3DDevice *iface,
HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device,
WINED3DPRESENT_PARAMETERS *present_parameters, WINED3DSURFTYPE surface_type,
void *parent, const struct wined3d_parent_ops *parent_ops,
struct wined3d_swapchain **swapchain)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_swapchain *object;
HRESULT hr;

View File

@ -26,7 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture);
static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struct wined3d_texture_ops *texture_ops,
UINT layer_count, UINT level_count, WINED3DRESOURCETYPE resource_type, IWineD3DDeviceImpl *device,
UINT layer_count, UINT level_count, WINED3DRESOURCETYPE resource_type, struct wined3d_device *device,
DWORD usage, const struct wined3d_format *format, WINED3DPOOL pool, void *parent,
const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops)
{
@ -84,7 +84,7 @@ static void gltexture_delete(struct gl_texture *tex)
static void wined3d_texture_unload(struct wined3d_texture *texture)
{
IWineD3DDeviceImpl *device = texture->resource.device;
struct wined3d_device *device = texture->resource.device;
struct wined3d_context *context = NULL;
if (texture->texture_rgb.name || texture->texture_srgb.name)
@ -668,7 +668,7 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
static void texture2d_preload(struct wined3d_texture *texture, enum WINED3DSRGB srgb)
{
UINT sub_count = texture->level_count * texture->layer_count;
IWineD3DDeviceImpl *device = texture->resource.device;
struct wined3d_device *device = texture->resource.device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
struct wined3d_context *context = NULL;
struct gl_texture *gl_tex;
@ -797,7 +797,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
};
static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_length, UINT levels,
IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -916,7 +916,7 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt
}
static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, UINT levels,
IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -1086,7 +1086,7 @@ static HRESULT texture3d_bind(struct wined3d_texture *texture,
/* Do not call while under the GL lock. */
static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB srgb)
{
IWineD3DDeviceImpl *device = texture->resource.device;
struct wined3d_device *device = texture->resource.device;
struct wined3d_context *context = NULL;
BOOL srgb_was_toggled = FALSE;
unsigned int i;
@ -1187,7 +1187,7 @@ static const struct wined3d_resource_ops texture3d_resource_ops =
};
static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, UINT height,
UINT depth, UINT levels, IWineD3DDeviceImpl *device, DWORD usage, enum wined3d_format_id format_id,
UINT depth, UINT levels, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id,
WINED3DPOOL pool, void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -1281,11 +1281,10 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U
return WINED3D_OK;
}
HRESULT CDECL wined3d_texture_create_2d(IWineD3DDevice *iface, UINT width, UINT height,
HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT width, UINT height,
UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_texture *object;
HRESULT hr;
@ -1318,11 +1317,10 @@ HRESULT CDECL wined3d_texture_create_2d(IWineD3DDevice *iface, UINT width, UINT
return WINED3D_OK;
}
HRESULT CDECL wined3d_texture_create_3d(IWineD3DDevice *iface, UINT width, UINT height, UINT depth,
HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT width, UINT height, UINT depth,
UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_texture *object;
HRESULT hr;
@ -1355,11 +1353,10 @@ HRESULT CDECL wined3d_texture_create_3d(IWineD3DDevice *iface, UINT width, UINT
return WINED3D_OK;
}
HRESULT CDECL wined3d_texture_create_cube(IWineD3DDevice *iface, UINT edge_length,
HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, UINT edge_length,
UINT level_count, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_texture *object;
HRESULT hr;

View File

@ -2774,7 +2774,7 @@ void gen_ffp_frag_op(struct wined3d_stateblock *stateblock, struct ffp_frag_sett
unsigned int i;
DWORD ttff;
DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
IWineD3DDeviceImpl *device = stateblock->device;
struct wined3d_device *device = stateblock->device;
struct wined3d_surface *rt = device->render_targets[0];
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;

View File

@ -157,8 +157,8 @@ static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
}
}
static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declaration, IWineD3DDeviceImpl *device,
const WINED3DVERTEXELEMENT *elements, UINT element_count,
static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declaration,
struct wined3d_device *device, const WINED3DVERTEXELEMENT *elements, UINT element_count,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
@ -237,11 +237,10 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
return WINED3D_OK;
}
HRESULT CDECL wined3d_vertex_declaration_create(IWineD3DDevice *iface,
HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device,
const WINED3DVERTEXELEMENT *elements, UINT element_count, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_vertex_declaration *object;
HRESULT hr;
@ -405,11 +404,10 @@ static unsigned int convert_fvf_to_declaration(const struct wined3d_gl_info *gl_
return size;
}
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(IWineD3DDevice *iface,
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device,
DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops,
struct wined3d_vertex_declaration **declaration)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
WINED3DVERTEXELEMENT *elements;
unsigned int size;
DWORD hr;
@ -420,7 +418,7 @@ HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(IWineD3DDevice *iface,
size = convert_fvf_to_declaration(&device->adapter->gl_info, fvf, &elements);
if (size == ~0U) return E_OUTOFMEMORY;
hr = wined3d_vertex_declaration_create(iface, elements, size, parent, parent_ops, declaration);
hr = wined3d_vertex_declaration_create(device, elements, size, parent, parent_ops, declaration);
HeapFree(GetProcessHeap(), 0, elements);
return hr;
}

View File

@ -296,7 +296,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
volume_unload,
};
static HRESULT volume_init(struct wined3d_volume *volume, IWineD3DDeviceImpl *device, UINT width,
static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device *device, UINT width,
UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool,
void *parent, const struct wined3d_parent_ops *parent_ops)
{
@ -330,11 +330,10 @@ static HRESULT volume_init(struct wined3d_volume *volume, IWineD3DDeviceImpl *de
return WINED3D_OK;
}
HRESULT CDECL wined3d_volume_create(IWineD3DDevice *iface, UINT width, UINT height,
HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, UINT height,
UINT depth, DWORD usage, enum wined3d_format_id format_id, WINED3DPOOL pool, void *parent,
const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume)
{
IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *)iface;
struct wined3d_volume *object;
HRESULT hr;

View File

@ -34,7 +34,7 @@ struct wined3d_wndproc
HWND window;
BOOL unicode;
WNDPROC proc;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
};
struct wined3d_wndproc_table
@ -399,7 +399,7 @@ static struct wined3d_wndproc *wined3d_find_wndproc(HWND window)
static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam, LPARAM lparam)
{
struct wined3d_wndproc *entry;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
BOOL unicode;
WNDPROC proc;
@ -421,7 +421,7 @@ static LRESULT CALLBACK wined3d_wndproc(HWND window, UINT message, WPARAM wparam
return device_process_message(device, window, unicode, message, wparam, lparam, proc);
}
BOOL wined3d_register_window(HWND window, IWineD3DDeviceImpl *device)
BOOL wined3d_register_window(HWND window, struct wined3d_device *device)
{
struct wined3d_wndproc *entry;

View File

@ -52,9 +52,6 @@
#define WINED3D_QUIRK_NV_CLIP_BROKEN 0x00000010
#define WINED3D_QUIRK_FBO_TEX_UPDATE 0x00000020
typedef struct wined3d_device IWineD3DDeviceImpl;
typedef struct wined3d_device IWineD3DDevice;
/* Texture format fixups */
enum fixup_channel_source
@ -752,14 +749,14 @@ struct wined3d_shader_backend_ops
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)(void *shader_priv, const struct wined3d_gl_info *gl_info);
void (*shader_update_float_vertex_constants)(IWineD3DDeviceImpl *device, UINT start, UINT count);
void (*shader_update_float_pixel_constants)(IWineD3DDeviceImpl *device, UINT start, UINT count);
void (*shader_update_float_vertex_constants)(struct wined3d_device *device, UINT start, UINT count);
void (*shader_update_float_pixel_constants)(struct wined3d_device *device, UINT start, UINT count);
void (*shader_load_constants)(const struct wined3d_context *context, char usePS, char useVS);
void (*shader_load_np2fixup_constants)(void *shader_priv, const struct wined3d_gl_info *gl_info,
const struct wined3d_state *state);
void (*shader_destroy)(struct wined3d_shader *shader);
HRESULT (*shader_alloc_private)(IWineD3DDeviceImpl *device);
void (*shader_free_private)(IWineD3DDeviceImpl *device);
HRESULT (*shader_alloc_private)(struct wined3d_device *device);
void (*shader_free_private)(struct wined3d_device *device);
BOOL (*shader_dirtifyable_constants)(void);
void (*shader_get_caps)(const struct wined3d_gl_info *gl_info, struct shader_caps *caps);
BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup);
@ -918,7 +915,7 @@ struct wined3d_stream_info
*/
/* Routine common to the draw primitive and draw indexed primitive routines */
void drawPrimitive(IWineD3DDeviceImpl *device, UINT index_count,
void drawPrimitive(struct wined3d_device *device, UINT index_count,
UINT start_idx, UINT idxBytes, const void *idxData) DECLSPEC_HIDDEN;
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
@ -1031,8 +1028,9 @@ enum wined3d_event_query_result
};
void wined3d_event_query_destroy(struct wined3d_event_query *query) DECLSPEC_HIDDEN;
enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
enum wined3d_event_query_result wined3d_event_query_finish(struct wined3d_event_query *query,
struct wined3d_device *device) DECLSPEC_HIDDEN;
void wined3d_event_query_issue(struct wined3d_event_query *query, struct wined3d_device *device) DECLSPEC_HIDDEN;
BOOL wined3d_event_query_supported(const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
struct wined3d_context
@ -1145,8 +1143,8 @@ struct fragment_pipeline
{
void (*enable_extension)(BOOL enable);
void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps);
HRESULT (*alloc_private)(IWineD3DDeviceImpl *device);
void (*free_private)(IWineD3DDeviceImpl *device);
HRESULT (*alloc_private)(struct wined3d_device *device);
void (*free_private)(struct wined3d_device *device);
BOOL (*color_fixup_supported)(struct color_fixup_desc fixup);
const struct StateEntryTemplate *states;
BOOL ffp_proj_control;
@ -1177,16 +1175,17 @@ enum wined3d_blit_op
* already under the GL lock. */
struct blit_shader
{
HRESULT (*alloc_private)(IWineD3DDeviceImpl *device);
void (*free_private)(IWineD3DDeviceImpl *device);
HRESULT (*alloc_private)(struct wined3d_device *device);
void (*free_private)(struct wined3d_device *device);
HRESULT (*set_shader)(void *blit_priv, const struct wined3d_gl_info *gl_info, struct wined3d_surface *surface);
void (*unset_shader)(const struct wined3d_gl_info *gl_info);
BOOL (*blit_supported)(const struct wined3d_gl_info *gl_info, enum wined3d_blit_op blit_op,
const RECT *src_rect, DWORD src_usage, WINED3DPOOL src_pool, const struct wined3d_format *src_format,
const RECT *dst_rect, DWORD dst_usage, WINED3DPOOL dst_pool, const struct wined3d_format *dst_format);
HRESULT (*color_fill)(IWineD3DDeviceImpl *device, struct wined3d_surface *dst_surface,
HRESULT (*color_fill)(struct wined3d_device *device, struct wined3d_surface *dst_surface,
const RECT *dst_rect, const WINED3DCOLORVALUE *color);
HRESULT (*depth_fill)(IWineD3DDeviceImpl *device, struct wined3d_surface *surface, const RECT *rect, float depth);
HRESULT (*depth_fill)(struct wined3d_device *device,
struct wined3d_surface *surface, const RECT *rect, float depth);
};
extern const struct blit_shader ffp_blit DECLSPEC_HIDDEN;
@ -1199,19 +1198,19 @@ const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *g
DECLSPEC_HIDDEN;
/* Temporary blit_shader helper functions */
HRESULT arbfp_blit_surface(IWineD3DDeviceImpl *device, struct wined3d_surface *src_surface,
HRESULT arbfp_blit_surface(struct wined3d_device *device, struct wined3d_surface *src_surface,
const RECT *src_rect, struct wined3d_surface *dst_surface, const RECT *dst_rect_in,
enum wined3d_blit_op blit_op, DWORD Filter) DECLSPEC_HIDDEN;
struct wined3d_context *context_acquire(IWineD3DDeviceImpl *This, struct wined3d_surface *target) DECLSPEC_HIDDEN;
struct wined3d_context *context_acquire(struct wined3d_device *device, struct wined3d_surface *target) DECLSPEC_HIDDEN;
void context_alloc_event_query(struct wined3d_context *context,
struct wined3d_event_query *query) DECLSPEC_HIDDEN;
void context_alloc_occlusion_query(struct wined3d_context *context,
struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceImpl *device,
void context_apply_blit_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN;
BOOL context_apply_clear_state(struct wined3d_context *context, struct wined3d_device *device,
UINT rt_count, struct wined3d_surface **rts, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN;
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target,
struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN;
void context_attach_depth_stencil_fbo(struct wined3d_context *context,
@ -1220,7 +1219,7 @@ void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fb
void context_check_fbo_status(struct wined3d_context *context, GLenum target) DECLSPEC_HIDDEN;
struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_surface *target,
const struct wined3d_format *ds_format) DECLSPEC_HIDDEN;
void context_destroy(IWineD3DDeviceImpl *This, struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_destroy(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN;
void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN;
struct wined3d_context *context_get_current(void) DECLSPEC_HIDDEN;
@ -1542,7 +1541,7 @@ struct wined3d_adapter
BOOL initPixelFormats(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor) DECLSPEC_HIDDEN;
BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
extern unsigned int WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, int glram) DECLSPEC_HIDDEN;
extern unsigned int WineD3DAdapterChangeGLRam(struct wined3d_device *device, int glram) DECLSPEC_HIDDEN;
extern void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
/*****************************************************************************
@ -1559,7 +1558,7 @@ struct WineD3DRectPatch
struct list entry;
};
HRESULT tesselate_rectpatch(IWineD3DDeviceImpl *This, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN;
HRESULT tesselate_rectpatch(struct wined3d_device *device, struct WineD3DRectPatch *patch) DECLSPEC_HIDDEN;
enum projection_types
{
@ -1769,27 +1768,27 @@ struct wined3d_device
struct WineD3DRectPatch *currentPatch;
};
HRESULT device_clear_render_targets(IWineD3DDeviceImpl *device, UINT rt_count, struct wined3d_surface **rts,
HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count, struct wined3d_surface **rts,
struct wined3d_surface *depth_stencil, UINT rect_count, const RECT *rects, const RECT *draw_rect,
DWORD flags, const WINED3DCOLORVALUE *color, float depth, DWORD stencil) DECLSPEC_HIDDEN;
BOOL device_context_add(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_context_remove(IWineD3DDeviceImpl *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect) DECLSPEC_HIDDEN;
HRESULT device_init(IWineD3DDeviceImpl *device, struct wined3d *wined3d,
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN;
void device_get_draw_rect(struct wined3d_device *device, RECT *rect) DECLSPEC_HIDDEN;
HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
UINT adapter_idx, WINED3DDEVTYPE device_type, HWND focus_window, DWORD flags,
IWineD3DDeviceParent *device_parent) DECLSPEC_HIDDEN;
void device_preload_textures(IWineD3DDeviceImpl *device) DECLSPEC_HIDDEN;
LRESULT device_process_message(IWineD3DDeviceImpl *device, HWND window, BOOL unicode,
void device_preload_textures(struct wined3d_device *device) DECLSPEC_HIDDEN;
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode,
UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN;
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
void device_stream_info_from_declaration(struct wined3d_device *device,
BOOL use_vshader, struct wined3d_stream_info *stream_info, BOOL *fixup) DECLSPEC_HIDDEN;
void device_switch_onscreen_ds(IWineD3DDeviceImpl *device, struct wined3d_context *context,
void device_switch_onscreen_ds(struct wined3d_device *device, struct wined3d_context *context,
struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN;
void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This) DECLSPEC_HIDDEN;
void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) DECLSPEC_HIDDEN;
void device_update_stream_info(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
void IWineD3DDeviceImpl_FindTexUnitMap(struct wined3d_device *device) DECLSPEC_HIDDEN;
void IWineD3DDeviceImpl_MarkStateDirty(struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
static inline BOOL isStateDirty(struct wined3d_context *context, DWORD state)
{
@ -1812,7 +1811,7 @@ struct wined3d_resource_ops
struct wined3d_resource
{
LONG ref;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
WINED3DRESOURCETYPE resourceType;
const struct wined3d_format *format;
WINED3DMULTISAMPLE_TYPE multisample_type;
@ -1840,7 +1839,7 @@ HRESULT resource_free_private_data(struct wined3d_resource *resource, REFGUID gu
DWORD resource_get_priority(const struct wined3d_resource *resource) DECLSPEC_HIDDEN;
HRESULT resource_get_private_data(const struct wined3d_resource *resource, REFGUID guid,
void *data, DWORD *data_size) DECLSPEC_HIDDEN;
HRESULT resource_init(struct wined3d_resource *resource, IWineD3DDeviceImpl *device,
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device,
WINED3DRESOURCETYPE resource_type, const struct wined3d_format *format,
WINED3DMULTISAMPLE_TYPE multisample_type, UINT multisample_quality,
DWORD usage, WINED3DPOOL pool, UINT width, UINT height, UINT depth, UINT size,
@ -2208,7 +2207,7 @@ struct wined3d_vertex_declaration
LONG ref;
void *parent;
const struct wined3d_parent_ops *parent_ops;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
struct wined3d_vertex_declaration_element *elements;
UINT element_count;
@ -2307,7 +2306,7 @@ struct wined3d_state
struct wined3d_stateblock
{
LONG ref; /* Note: Ref counting not required */
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
WINED3DSTATEBLOCKTYPE blockType;
/* Array indicating whether things have been set or changed */
@ -2368,7 +2367,7 @@ struct wined3d_query
{
LONG ref;
const struct wined3d_query_ops *query_ops;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
enum query_state state;
WINED3DQUERYTYPE type;
DWORD data_size;
@ -2454,7 +2453,7 @@ struct wined3d_swapchain
void *parent;
const struct wined3d_parent_ops *parent_ops;
const struct wined3d_swapchain_ops *swapchain_ops;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
struct wined3d_surface **back_buffers;
struct wined3d_surface *front_buffer;
@ -2765,7 +2764,7 @@ struct wined3d_palette
{
LONG ref;
void *parent;
IWineD3DDeviceImpl *device;
struct wined3d_device *device;
HPALETTE hpal;
WORD palVersion; /*| */