Commit da1e5573 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Rename WineD3DContext to struct wined3d_context.

parent 1d647283
......@@ -534,7 +534,7 @@ static void shader_arb_load_constants(
IWineD3DDeviceImpl* deviceImpl = (IWineD3DDeviceImpl*) device;
IWineD3DStateBlockImpl* stateBlock = deviceImpl->stateBlock;
const struct WineD3DContext *context = context_get_current();
const struct wined3d_context *context = context_get_current();
const struct wined3d_gl_info *gl_info = context->gl_info;
if (useVertexShader) {
......@@ -560,7 +560,7 @@ static void shader_arb_load_constants(
static void shader_arb_update_float_vertex_constants(IWineD3DDevice *iface, UINT start, UINT count)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct WineD3DContext *context = context_get_current();
struct wined3d_context *context = context_get_current();
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
* context. On a context switch the old context will be fully dirtified */
......@@ -573,7 +573,7 @@ static void shader_arb_update_float_vertex_constants(IWineD3DDevice *iface, UINT
static void shader_arb_update_float_pixel_constants(IWineD3DDevice *iface, UINT start, UINT count)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct WineD3DContext *context = context_get_current();
struct wined3d_context *context = context_get_current();
/* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active
* context. On a context switch the old context will be fully dirtified */
......@@ -4215,7 +4215,7 @@ static inline void find_arb_vs_compile_args(IWineD3DVertexShaderImpl *shader, IW
static void shader_arb_select(IWineD3DDevice *iface, BOOL usePS, BOOL useVS) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct shader_arb_priv *priv = This->shader_priv;
struct WineD3DContext *context = context_get_current();
struct wined3d_context *context = context_get_current();
const struct wined3d_gl_info *gl_info = context->gl_info;
int i;
......@@ -5161,7 +5161,8 @@ static void arbfp_get_caps(WINED3DDEVTYPE devtype, const struct wined3d_gl_info
#undef GLINFO_LOCATION
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
static void state_texfactor_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void state_texfactor_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
float col[4];
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
......@@ -5182,7 +5183,8 @@ static void state_texfactor_arbfp(DWORD state, IWineD3DStateBlockImpl *statebloc
}
static void state_arb_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void state_arb_specularenable(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
float col[4];
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
......@@ -5209,7 +5211,8 @@ static void state_arb_specularenable(DWORD state, IWineD3DStateBlockImpl *stateb
checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_SPECULAR_ENABLE, col)");
}
static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
float mat[2][2];
......@@ -5244,7 +5247,8 @@ static void set_bumpmat_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, W
checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_BUMPMAT(stage), &mat[0][0])");
}
static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void tex_bumpenvlum_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
float param[4];
......@@ -5751,7 +5755,8 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi
return ret;
}
static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
struct shader_arb_priv *priv = device->fragment_priv;
BOOL use_pshader = use_ps(stateblock);
......@@ -5848,7 +5853,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
* is that changing the fog start and fog end(which links to FOGENABLE in vertex) results in the
* fragment_prog_arbfp function being called because FOGENABLE is dirty, which calls this function here
*/
static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
enum fogsource new_source;
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
......@@ -5878,7 +5884,8 @@ static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, Win
}
}
static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
if(!isStateDirty(context, STATE_PIXELSHADER)) {
fragment_prog_arbfp(state, stateblock, context);
}
......
......@@ -796,7 +796,8 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[MAX_TEXTURES], con
#undef GLINFO_LOCATION
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
IWineD3DDeviceImpl *This = stateblock->wineD3DDevice;
const struct atifs_ffp_desc *desc;
struct ffp_frag_settings settings;
......@@ -842,7 +843,8 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi
GL_EXTCALL(glBindFragmentShaderATI(desc->shader));
}
static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
float col[4];
D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_TEXTUREFACTOR], col);
......@@ -850,7 +852,8 @@ static void state_texfactor_atifs(DWORD state, IWineD3DStateBlockImpl *statebloc
checkGLcall("glSetFragmentShaderConstantATI(ATI_FFP_CONST_TFACTOR, col)");
}
static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
float mat[2][2];
......@@ -873,13 +876,15 @@ static void set_bumpmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
checkGLcall("glSetFragmentShaderConstantATI(ATI_FFP_CONST_BUMPMAT(stage), mat)");
}
static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
if(!isStateDirty(context, STATE_PIXELSHADER)) {
set_tex_op_atifs(state, stateblock, context);
}
}
static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
BOOL use_vshader = use_vs(stateblock);
......
......@@ -4888,7 +4888,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
UINT drawable_width, drawable_height;
IWineD3DSurfaceImpl *depth_stencil = (IWineD3DSurfaceImpl *) This->stencilBufferTarget;
IWineD3DSwapChainImpl *swapchain = NULL;
struct WineD3DContext *context;
struct wined3d_context *context;
/* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the
* drawable. After the clear we'll mark the drawable up to date, so we have to make sure that this is true
......@@ -6011,7 +6011,7 @@ static void color_fill_fbo(IWineD3DDevice *iface, IWineD3DSurface *surface,
const WINED3DRECT *rect, const float color[4])
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
struct WineD3DContext *context;
struct wined3d_context *context;
IWineD3DSwapChain *swapchain;
swapchain = get_swapchain(surface);
......@@ -6390,7 +6390,7 @@ void stretch_rect_fbo(IWineD3DDevice *iface, IWineD3DSurface *src_surface, WINED
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
GLbitfield mask = GL_COLOR_BUFFER_BIT; /* TODO: Support blitting depth/stencil surfaces */
IWineD3DSwapChain *src_swapchain, *dst_swapchain;
struct WineD3DContext *context;
struct wined3d_context *context;
GLenum gl_filter;
POINT offset = {0, 0};
......@@ -6593,7 +6593,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
|| ((IWineD3DSurfaceImpl *)This->stencilBufferTarget)->Flags & SFLAG_DISCARD) {
surface_modify_ds_location(This->stencilBufferTarget, SFLAG_DS_DISCARDED);
} else {
struct WineD3DContext *context = ActivateContext(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD);
struct wined3d_context *context = ActivateContext(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD);
surface_load_ds_location(This->stencilBufferTarget, context, SFLAG_DS_OFFSCREEN);
surface_modify_ds_location(This->stencilBufferTarget, SFLAG_DS_OFFSCREEN);
}
......@@ -7679,10 +7679,10 @@ const DWORD SavedVertexStates_S[NUM_SAVEDVERTEXSTATES_S] = {
void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
DWORD rep = This->StateTable[state].representative;
struct wined3d_context *context;
DWORD idx;
BYTE shift;
UINT i;
WineD3DContext *context;
if(!rep) return;
for(i = 0; i < This->numContexts; i++) {
......@@ -7696,7 +7696,7 @@ void IWineD3DDeviceImpl_MarkStateDirty(IWineD3DDeviceImpl *This, DWORD state) {
}
}
void get_drawable_size_pbuffer(struct WineD3DContext *context, UINT *width, UINT *height)
void get_drawable_size_pbuffer(struct wined3d_context *context, UINT *width, UINT *height)
{
IWineD3DDeviceImpl *device = ((IWineD3DSurfaceImpl *)context->current_rt)->resource.wineD3DDevice;
/* The drawable size of a pbuffer render target is the current pbuffer size. */
......@@ -7704,7 +7704,7 @@ void get_drawable_size_pbuffer(struct WineD3DContext *context, UINT *width, UINT
*height = device->pbufferHeight;
}
void get_drawable_size_fbo(struct WineD3DContext *context, UINT *width, UINT *height)
void get_drawable_size_fbo(struct wined3d_context *context, UINT *width, UINT *height)
{
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->current_rt;
/* The drawable size of a fbo target is the opengl texture size, which is the power of two size. */
......@@ -7712,7 +7712,7 @@ void get_drawable_size_fbo(struct WineD3DContext *context, UINT *width, UINT *he
*height = surface->pow2Height;
}
void get_drawable_size_backbuffer(struct WineD3DContext *context, UINT *width, UINT *height)
void get_drawable_size_backbuffer(struct wined3d_context *context, UINT *width, UINT *height)
{
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->surface;
/* The drawable size of a backbuffer / aux buffer offscreen target is the size of the
......
......@@ -73,7 +73,7 @@ static void drawStridedFast(IWineD3DDevice *iface, GLenum primitive_type,
static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_stream_info *si, UINT NumVertexes,
GLenum glPrimType, const void *idxData, UINT idxSize, UINT minIndex, UINT startIdx)
{
struct WineD3DContext *context = context_get_current();
struct wined3d_context *context = context_get_current();
unsigned int textureNo = 0;
const WORD *pIdxBufS = NULL;
const DWORD *pIdxBufL = NULL;
......@@ -559,7 +559,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertice
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DSurfaceImpl *target;
struct WineD3DContext *context;
struct wined3d_context *context;
unsigned int i;
if (!index_count) return;
......
......@@ -147,7 +147,7 @@ static void WINE_GLAPI wine_glGetDoublev(GLenum pname, GLdouble* params) {
static void (WINE_GLAPI *old_fogcoord_glEnable) (GLenum cap) = NULL;
static void WINE_GLAPI wine_glEnable(GLenum cap) {
if(cap == GL_FOG) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
ctx->fog_enabled = 1;
if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
}
......@@ -157,7 +157,7 @@ static void WINE_GLAPI wine_glEnable(GLenum cap) {
static void (WINE_GLAPI *old_fogcoord_glDisable) (GLenum cap) = NULL;
static void WINE_GLAPI wine_glDisable(GLenum cap) {
if(cap == GL_FOG) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
ctx->fog_enabled = 0;
if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
}
......@@ -166,7 +166,7 @@ static void WINE_GLAPI wine_glDisable(GLenum cap) {
static void (WINE_GLAPI *old_fogcoord_glFogi) (GLenum pname, GLint param) = NULL;
static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
ctx->gl_fog_source = param;
......@@ -188,7 +188,7 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
static void (WINE_GLAPI *old_fogcoord_glFogiv) (GLenum pname, const GLint *param) = NULL;
static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
ctx->gl_fog_source = *param;
if(*param == GL_FRAGMENT_DEPTH_EXT) {
......@@ -209,7 +209,7 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
static void (WINE_GLAPI *old_fogcoord_glFogf) (GLenum pname, GLfloat param) = NULL;
static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
ctx->gl_fog_source = (GLint) param;
if(param == GL_FRAGMENT_DEPTH_EXT) {
......@@ -230,7 +230,7 @@ static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) {
static void (WINE_GLAPI *old_fogcoord_glFogfv) (GLenum pname, const GLfloat *param) = NULL;
static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
if(pname == GL_FOG_COORDINATE_SOURCE_EXT) {
ctx->gl_fog_source = (GLint) *param;
if(*param == GL_FRAGMENT_DEPTH_EXT) {
......@@ -269,7 +269,7 @@ static void (WINE_GLAPI *old_fogcoord_glFogCoordfvEXT) (const GLfloat *f) = NULL
static void (WINE_GLAPI *old_fogcoord_glFogCoorddvEXT) (const GLdouble *f) = NULL;
static void WINE_GLAPI wine_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
GLfloat i;
......@@ -299,7 +299,7 @@ static void WINE_GLAPI wine_glVertex3fv(const GLfloat *pos) {
}
static void WINE_GLAPI wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
ctx->color[0] = r;
ctx->color[1] = g;
ctx->color[2] = b;
......@@ -327,7 +327,7 @@ static void WINE_GLAPI wine_glColor4ub(GLubyte r, GLubyte g, GLubyte b, GLubyte
* precision function
*/
static void WINE_GLAPI wine_glFogCoordfEXT(GLfloat f) {
struct WineD3DContext *ctx = context_get_current();
struct wined3d_context *ctx = context_get_current();
ctx->fog_coord_value = f;
}
static void WINE_GLAPI wine_glFogCoorddEXT(GLdouble f) {
......
......@@ -32,7 +32,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* GL locking for state handlers is done by the caller. */
static void nvts_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvts_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
BOOL bumpmap = FALSE;
if(stage > 0 && (stateblock->textureState[stage - 1][WINED3DTSS_COLOROP] == WINED3DTOP_BUMPENVMAPLUMINANCE ||
......@@ -452,7 +453,8 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX
}
static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map & (1 << stage);
......@@ -544,7 +546,8 @@ static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3
}
}
static void nvts_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvts_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD sampler = state - STATE_SAMPLER(0);
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[sampler];
......@@ -559,7 +562,8 @@ static void nvts_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
nvts_activate_dimensions(sampler, stateblock, context);
}
static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage + 1];
float mat[2][2];
......@@ -586,7 +590,8 @@ static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, Win
}
}
static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
float col[4];
D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_TEXTUREFACTOR], col);
GL_EXTCALL(glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, &col[0]));
......
......@@ -457,7 +457,7 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD
if (dwIssueFlags & WINED3DISSUE_END)
{
struct wined3d_event_query *query = This->extendedData;
struct WineD3DContext *context;
struct wined3d_context *context;
if (query->context)
{
......@@ -514,7 +514,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
if (GL_SUPPORT(ARB_OCCLUSION_QUERY))
{
struct wined3d_occlusion_query *query = This->extendedData;
struct WineD3DContext *context;
struct wined3d_context *context;
/* This is allowed according to msdn and our tests. Reset the query and restart */
if (dwIssueFlags & WINED3DISSUE_BEGIN)
......
......@@ -3140,7 +3140,7 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
float left, right, top, bottom; /* Texture coordinates */
UINT fbwidth = Src->currentDesc.Width;
UINT fbheight = Src->currentDesc.Height;
struct WineD3DContext *context;
struct wined3d_context *context;
GLenum drawBuffer = GL_BACK;
GLenum texture_target;
BOOL noBackBufferBackup;
......@@ -4374,7 +4374,7 @@ void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location) {
}
/* Context activation is done by the caller. */
void surface_load_ds_location(IWineD3DSurface *iface, struct WineD3DContext *context, DWORD location)
void surface_load_ds_location(IWineD3DSurface *iface, struct wined3d_context *context, DWORD location)
{
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
......
......@@ -372,10 +372,11 @@ const IWineD3DSwapChainVtbl IWineD3DSwapChain_Vtbl =
IWineD3DBaseSwapChainImpl_GetGammaRamp
};
WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface) {
WineD3DContext *ctx;
struct wined3d_context *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *iface)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface;
WineD3DContext **newArray;
struct wined3d_context **newArray;
struct wined3d_context *ctx;
TRACE("Creating a new context for swapchain %p, thread %d\n", This, GetCurrentThreadId());
......@@ -402,7 +403,7 @@ WineD3DContext *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwapChain *
return ctx;
}
void get_drawable_size_swapchain(struct WineD3DContext *context, UINT *width, UINT *height)
void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height)
{
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)context->current_rt;
/* The drawable size of an onscreen drawable is the surface size.
......
......@@ -2394,7 +2394,8 @@ void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *des
*/
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
/* GL locking is done by the caller (state handler) */
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
if(stateblock->textures[stage]) {
switch (IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[stage])) {
case GL_TEXTURE_2D:
......@@ -2468,7 +2469,8 @@ void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock
}
/* GL locking is done by the caller (state handler) */
void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
DWORD sampler = state - STATE_SAMPLER(0);
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[sampler];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment