wined3d: Get rid of the WINED3DRENDERSTATETYPE typedef.
This commit is contained in:
parent
5bddd4427d
commit
3082c1a9de
|
@ -587,7 +587,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(IDirect3DDevice8 *iface,
|
|||
hr = wined3d_device_reset(This->wined3d_device, &swapchain_desc, reset_enum_callback);
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_POINTSIZE_MIN, 0);
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
|
||||
This->lost = FALSE;
|
||||
}
|
||||
else
|
||||
|
@ -1439,7 +1439,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(IDirect3DDevice8 *ifac
|
|||
switch (State)
|
||||
{
|
||||
case D3DRS_ZBIAS:
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, Value);
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3D_RS_DEPTHBIAS, Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1462,7 +1462,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(IDirect3DDevice8 *ifac
|
|||
switch (State)
|
||||
{
|
||||
case D3DRS_ZBIAS:
|
||||
hr = wined3d_device_get_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, pValue);
|
||||
hr = wined3d_device_get_render_state(This->wined3d_device, WINED3D_RS_DEPTHBIAS, pValue);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3112,7 +3112,7 @@ HRESULT device_init(IDirect3DDevice8Impl *device, IDirect3D8Impl *parent, struct
|
|||
return hr;
|
||||
}
|
||||
|
||||
hr = wined3d_device_set_render_state(device->wined3d_device, WINED3DRS_POINTSIZE_MIN, 0);
|
||||
hr = wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_POINTSIZE_MIN, 0);
|
||||
wined3d_mutex_unlock();
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
|
|
@ -2456,7 +2456,7 @@ static HRESULT IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
|||
break;
|
||||
|
||||
case D3DRENDERSTATE_ZBIAS:
|
||||
hr = wined3d_device_get_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, Value);
|
||||
hr = wined3d_device_get_render_state(This->wined3d_device, WINED3D_RS_DEPTHBIAS, Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2765,7 +2765,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
|||
break;
|
||||
|
||||
case D3DRENDERSTATE_ZBIAS:
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3DRS_DEPTHBIAS, Value);
|
||||
hr = wined3d_device_set_render_state(This->wined3d_device, WINED3D_RS_DEPTHBIAS, Value);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -6972,7 +6972,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
|
|||
|
||||
ddraw->d3ddevice = device;
|
||||
|
||||
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3DRS_ZENABLE,
|
||||
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
|
||||
IDirect3DDeviceImpl_UpdateDepthStencil(device));
|
||||
|
||||
return D3D_OK;
|
||||
|
|
|
@ -156,7 +156,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
|
|||
/* IDirect3DDevices have color keying always enabled -
|
||||
* enable it before drawing. This overwrites any ALPHA*
|
||||
* render state. */
|
||||
wined3d_device_set_render_state(lpDevice->wined3d_device, WINED3DRS_COLORKEYENABLE, 1);
|
||||
wined3d_device_set_render_state(lpDevice->wined3d_device, WINED3D_RS_COLORKEYENABLE, 1);
|
||||
IDirect3DDevice7_DrawIndexedPrimitive(&lpDevice->IDirect3DDevice7_iface,
|
||||
D3DPT_TRIANGLELIST, D3DFVF_TLVERTEX, tl_vx, 0, This->indices, count * 3, 0);
|
||||
} break;
|
||||
|
|
|
@ -335,9 +335,9 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexB
|
|||
* the vertex ops
|
||||
*/
|
||||
doClip = VertexOp & D3DVOP_CLIP ? TRUE : FALSE;
|
||||
wined3d_device_get_render_state(device_impl->wined3d_device, WINED3DRS_CLIPPING, (DWORD *)&oldClip);
|
||||
wined3d_device_get_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, (DWORD *)&oldClip);
|
||||
if (doClip != oldClip)
|
||||
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3DRS_CLIPPING, doClip);
|
||||
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, doClip);
|
||||
|
||||
wined3d_device_set_stream_source(device_impl->wined3d_device,
|
||||
0, Src->wineD3DVertexBuffer, 0, get_flexible_vertex_size(Src->fvf));
|
||||
|
@ -347,7 +347,7 @@ static HRESULT WINAPI IDirect3DVertexBufferImpl_ProcessVertices(IDirect3DVertexB
|
|||
|
||||
/* Restore the states if needed */
|
||||
if (doClip != oldClip)
|
||||
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3DRS_CLIPPING, oldClip);
|
||||
wined3d_device_set_render_state(device_impl->wined3d_device, WINED3D_RS_CLIPPING, oldClip);
|
||||
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
|
|
|
@ -4476,8 +4476,8 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state,
|
|||
* duplicate the shader than have a no-op KIL instruction in every shader
|
||||
*/
|
||||
if (!device->vs_clipping && use_vs(state)
|
||||
&& state->render_states[WINED3DRS_CLIPPING]
|
||||
&& state->render_states[WINED3DRS_CLIPPLANEENABLE])
|
||||
&& state->render_states[WINED3D_RS_CLIPPING]
|
||||
&& state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
args->clip = 1;
|
||||
else
|
||||
args->clip = 0;
|
||||
|
@ -4538,8 +4538,8 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state,
|
|||
|
||||
if (args->clip.boolclip.clip_texcoord)
|
||||
{
|
||||
if (state->render_states[WINED3DRS_CLIPPING])
|
||||
args->clip.boolclip.clipplane_mask = (unsigned char)state->render_states[WINED3DRS_CLIPPLANEENABLE];
|
||||
if (state->render_states[WINED3D_RS_CLIPPING])
|
||||
args->clip.boolclip.clipplane_mask = (unsigned char)state->render_states[WINED3D_RS_CLIPPLANEENABLE];
|
||||
/* clipplane_mask was set to 0 by setting boolclip_compare to 0 */
|
||||
}
|
||||
|
||||
|
@ -5673,7 +5673,7 @@ static void state_texfactor_arbfp(struct wined3d_context *context,
|
|||
priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, ARB_FFP_CONST_TFACTOR + 1);
|
||||
}
|
||||
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3DRS_TEXTUREFACTOR], col);
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col);
|
||||
GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_TFACTOR, col));
|
||||
checkGLcall("glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, ARB_FFP_CONST_TFACTOR, col)");
|
||||
}
|
||||
|
@ -5699,7 +5699,7 @@ static void state_arb_specularenable(struct wined3d_context *context,
|
|||
priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, ARB_FFP_CONST_SPECULAR_ENABLE + 1);
|
||||
}
|
||||
|
||||
if (state->render_states[WINED3DRS_SPECULARENABLE])
|
||||
if (state->render_states[WINED3D_RS_SPECULARENABLE])
|
||||
{
|
||||
/* The specular color has no alpha */
|
||||
col[0] = 1.0f; col[1] = 1.0f;
|
||||
|
@ -6301,7 +6301,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
|
|||
|
||||
TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id);
|
||||
|
||||
if (isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE)))
|
||||
if (isStateDirty(context, STATE_RENDER(WINED3D_RS_FOGENABLE)))
|
||||
{
|
||||
if (!use_pshader && device->shader_backend == &arb_program_shader_backend && context->last_was_pshader)
|
||||
{
|
||||
|
@ -6311,8 +6311,8 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
|
|||
{
|
||||
set_bumpmat_arbfp(context, state, STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT00));
|
||||
}
|
||||
state_texfactor_arbfp(context, state, STATE_RENDER(WINED3DRS_TEXTUREFACTOR));
|
||||
state_arb_specularenable(context, state, STATE_RENDER(WINED3DRS_SPECULARENABLE));
|
||||
state_texfactor_arbfp(context, state, STATE_RENDER(WINED3D_RS_TEXTUREFACTOR));
|
||||
state_arb_specularenable(context, state, STATE_RENDER(WINED3D_RS_SPECULARENABLE));
|
||||
}
|
||||
else if (use_pshader && !isStateDirty(context, context->state_table[STATE_VSHADER].representative))
|
||||
{
|
||||
|
@ -6364,8 +6364,8 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
|
|||
{
|
||||
set_bumpmat_arbfp(context, state, STATE_TEXTURESTAGE(i, WINED3DTSS_BUMPENVMAT00));
|
||||
}
|
||||
state_texfactor_arbfp(context, state, STATE_RENDER(WINED3DRS_TEXTUREFACTOR));
|
||||
state_arb_specularenable(context, state, STATE_RENDER(WINED3DRS_SPECULARENABLE));
|
||||
state_texfactor_arbfp(context, state, STATE_RENDER(WINED3D_RS_TEXTUREFACTOR));
|
||||
state_arb_specularenable(context, state, STATE_RENDER(WINED3D_RS_SPECULARENABLE));
|
||||
}
|
||||
context->last_was_pshader = FALSE;
|
||||
} else {
|
||||
|
@ -6408,10 +6408,10 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
|
|||
if (!isStateDirty(context, STATE_PIXELSHADER))
|
||||
fragment_prog_arbfp(context, state, state_id);
|
||||
|
||||
if (!state->render_states[WINED3DRS_FOGENABLE])
|
||||
if (!state->render_states[WINED3D_RS_FOGENABLE])
|
||||
return;
|
||||
|
||||
if (state->render_states[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
if (state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
{
|
||||
if (use_vs(state))
|
||||
{
|
||||
|
@ -6419,7 +6419,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
|
|||
}
|
||||
else
|
||||
{
|
||||
if (state->render_states[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE || context->last_was_rhw)
|
||||
if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3DFOG_NONE || context->last_was_rhw)
|
||||
new_source = FOGSOURCE_COORD;
|
||||
else
|
||||
new_source = FOGSOURCE_FFP;
|
||||
|
@ -6433,7 +6433,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
|
|||
if (new_source != context->fog_source)
|
||||
{
|
||||
context->fog_source = new_source;
|
||||
state_fogstartend(context, state, STATE_RENDER(WINED3DRS_FOGSTART));
|
||||
state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6443,8 +6443,9 @@ static void textransform(struct wined3d_context *context, const struct wined3d_s
|
|||
fragment_prog_arbfp(context, state, state_id);
|
||||
}
|
||||
|
||||
static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
||||
{STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor_arbfp }, WINED3D_GL_EXT_NONE },
|
||||
static const struct StateEntryTemplate arbfp_fragmentstate_template[] =
|
||||
{
|
||||
{STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), { STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), state_texfactor_arbfp }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG1), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG2), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
|
@ -6566,14 +6567,14 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), tex_bumpenvlum_arbfp }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLOFFSET), { STATE_TEXTURESTAGE(7, WINED3DTSS_BUMPENVLSCALE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_PIXELSHADER, { STATE_PIXELSHADER, fragment_prog_arbfp }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGENABLE), { STATE_RENDER(WINED3DRS_FOGENABLE), state_arbfp_fog }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGTABLEMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGVERTEXMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGSTART), { STATE_RENDER(WINED3DRS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGEND), { STATE_RENDER(WINED3DRS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGCOLOR), { STATE_RENDER(WINED3DRS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGDENSITY), { STATE_RENDER(WINED3DRS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGENABLE), { STATE_RENDER(WINED3D_RS_FOGENABLE), state_arbfp_fog }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGTABLEMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGVERTEXMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGSTART), { STATE_RENDER(WINED3D_RS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGEND), { STATE_RENDER(WINED3D_RS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGCOLOR), { STATE_RENDER(WINED3D_RS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGDENSITY), { STATE_RENDER(WINED3D_RS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(0, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(1,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(1, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(2,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(2, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
|
@ -6582,7 +6583,7 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
|
|||
{STATE_TEXTURESTAGE(5,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(5, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(6,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(6, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(7,WINED3DTSS_TEXTURETRANSFORMFLAGS),{STATE_TEXTURESTAGE(7, WINED3DTSS_TEXTURETRANSFORMFLAGS), textransform }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_SPECULARENABLE), { STATE_RENDER(WINED3DRS_SPECULARENABLE), state_arb_specularenable}, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_SPECULARENABLE), { STATE_RENDER(WINED3D_RS_SPECULARENABLE), state_arb_specularenable}, WINED3D_GL_EXT_NONE },
|
||||
{0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE },
|
||||
};
|
||||
|
||||
|
|
|
@ -867,8 +867,8 @@ static void state_texfactor_atifs(struct wined3d_context *context, const struct
|
|||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
float col[4];
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3DRS_TEXTUREFACTOR], col);
|
||||
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col);
|
||||
GL_EXTCALL(glSetFragmentShaderConstantATI(ATI_FFP_CONST_TFACTOR, col));
|
||||
checkGLcall("glSetFragmentShaderConstantATI(ATI_FFP_CONST_TFACTOR, col)");
|
||||
}
|
||||
|
@ -934,20 +934,20 @@ static void atifs_apply_pixelshader(struct wined3d_context *context, const struc
|
|||
|
||||
static void atifs_srgbwriteenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
if (state->render_states[WINED3DRS_SRGBWRITEENABLE])
|
||||
if (state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
WARN("sRGB writes are not supported by this fragment pipe.\n");
|
||||
}
|
||||
|
||||
static const struct StateEntryTemplate atifs_fragmentstate_template[] = {
|
||||
{STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), state_texfactor_atifs }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGCOLOR), { STATE_RENDER(WINED3DRS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGDENSITY), { STATE_RENDER(WINED3DRS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGENABLE), { STATE_RENDER(WINED3DRS_FOGENABLE), state_fog_fragpart }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGTABLEMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGVERTEXMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGSTART), { STATE_RENDER(WINED3DRS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_FOGEND), { STATE_RENDER(WINED3DRS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), { STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), atifs_srgbwriteenable }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), { STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), state_texfactor_atifs }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGCOLOR), { STATE_RENDER(WINED3D_RS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGDENSITY), { STATE_RENDER(WINED3D_RS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGENABLE), { STATE_RENDER(WINED3D_RS_FOGENABLE), state_fog_fragpart }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGTABLEMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGVERTEXMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGSTART), { STATE_RENDER(WINED3D_RS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_FOGEND), { STATE_RENDER(WINED3D_RS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), { STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), atifs_srgbwriteenable }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), set_tex_op_atifs }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG1), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG2), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), NULL }, WINED3D_GL_EXT_NONE },
|
||||
|
|
|
@ -1780,44 +1780,44 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
/* Other misc states */
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
checkGLcall("glDisable(GL_ALPHA_TEST)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ALPHATESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHATESTENABLE));
|
||||
glDisable(GL_LIGHTING);
|
||||
checkGLcall("glDisable GL_LIGHTING");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_LIGHTING));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_LIGHTING));
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
checkGLcall("glDisable GL_DEPTH_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ZENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZENABLE));
|
||||
glDisableWINE(GL_FOG);
|
||||
checkGLcall("glDisable GL_FOG");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_FOGENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_FOGENABLE));
|
||||
glDisable(GL_BLEND);
|
||||
checkGLcall("glDisable GL_BLEND");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
|
||||
glDisable(GL_CULL_FACE);
|
||||
checkGLcall("glDisable GL_CULL_FACE");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_CULLMODE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CULLMODE));
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
checkGLcall("glDisable GL_STENCIL_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_STENCILENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
checkGLcall("glDisable GL_SCISSOR_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
if (gl_info->supported[ARB_POINT_SPRITE])
|
||||
{
|
||||
glDisable(GL_POINT_SPRITE_ARB);
|
||||
checkGLcall("glDisable GL_POINT_SPRITE_ARB");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_POINTSPRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE));
|
||||
}
|
||||
glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
|
||||
checkGLcall("glColorMask");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
if (gl_info->supported[EXT_SECONDARY_COLOR])
|
||||
{
|
||||
glDisable(GL_COLOR_SUM_EXT);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SPECULARENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SPECULARENABLE));
|
||||
checkGLcall("glDisable(GL_COLOR_SUM_EXT)");
|
||||
}
|
||||
|
||||
|
@ -1837,7 +1837,7 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
glDisable(GL_CLIP_PLANE3); checkGLcall("glDisable(clip plane 3)");
|
||||
glDisable(GL_CLIP_PLANE4); checkGLcall("glDisable(clip plane 4)");
|
||||
glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_CLIPPING));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CLIPPING));
|
||||
|
||||
set_blit_dimension(width, height);
|
||||
device->frag_pipe->enable_extension(FALSE);
|
||||
|
@ -2206,8 +2206,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
|||
checkGLcall("glEnable GL_SCISSOR_TEST");
|
||||
LEAVE_GL();
|
||||
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_SCISSORRECT);
|
||||
|
||||
return TRUE;
|
||||
|
@ -2351,7 +2351,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
|||
* the alpha blend state changes with different render target formats. */
|
||||
if (!context->current_rt)
|
||||
{
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2363,11 +2363,11 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
|||
/* Disable blending when the alpha mask has changed and when a format doesn't support blending. */
|
||||
if ((old->alpha_mask && !new->alpha_mask) || (!old->alpha_mask && new->alpha_mask)
|
||||
|| !(new->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING))
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ALPHABLENDENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
|
||||
|
||||
/* Update sRGB writing when switching between formats that do/do not support sRGB writing */
|
||||
if ((old->flags & WINED3DFMT_FLAG_SRGB_WRITE) != (new->flags & WINED3DFMT_FLAG_SRGB_WRITE))
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SRGBWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE));
|
||||
}
|
||||
|
||||
/* When switching away from an offscreen render target, and we're not
|
||||
|
|
|
@ -718,10 +718,10 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
|
|||
if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE])
|
||||
{
|
||||
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE));
|
||||
}
|
||||
glStencilMask(~0U);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
glClearStencil(stencil);
|
||||
checkGLcall("glClearStencil");
|
||||
clear_mask = clear_mask | GL_STENCIL_BUFFER_BIT;
|
||||
|
@ -732,7 +732,7 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
|
|||
surface_modify_location(fb->depth_stencil, fb->depth_stencil->draw_binding, TRUE);
|
||||
|
||||
glDepthMask(GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZWRITEENABLE));
|
||||
glClearDepth(depth);
|
||||
checkGLcall("glClearDepth");
|
||||
clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT;
|
||||
|
@ -749,10 +749,10 @@ HRESULT device_clear_render_targets(struct wined3d_device *device, UINT rt_count
|
|||
}
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
glClearColor(color->r, color->g, color->b, color->a);
|
||||
checkGLcall("glClearColor");
|
||||
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
|
||||
|
@ -2419,7 +2419,7 @@ HRESULT CDECL wined3d_device_get_viewport(const struct wined3d_device *device, s
|
|||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device,
|
||||
WINED3DRENDERSTATETYPE state, DWORD value)
|
||||
enum wined3d_render_state state, DWORD value)
|
||||
{
|
||||
DWORD old_value = device->stateBlock->state.render_states[state];
|
||||
|
||||
|
@ -2445,7 +2445,7 @@ HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device,
|
|||
}
|
||||
|
||||
HRESULT CDECL wined3d_device_get_render_state(const struct wined3d_device *device,
|
||||
WINED3DRENDERSTATETYPE state, DWORD *value)
|
||||
enum wined3d_render_state state, DWORD *value)
|
||||
{
|
||||
TRACE("device %p, state %s (%#x), value %p.\n", device, debug_d3drenderstate(state), state, value);
|
||||
|
||||
|
@ -3227,7 +3227,7 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO
|
|||
dest_conv = dest_conv_addr;
|
||||
}
|
||||
|
||||
if (device->stateBlock->state.render_states[WINED3DRS_CLIPPING])
|
||||
if (device->stateBlock->state.render_states[WINED3D_RS_CLIPPING])
|
||||
{
|
||||
static BOOL warned = FALSE;
|
||||
/*
|
||||
|
@ -4497,8 +4497,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device
|
|||
}
|
||||
}
|
||||
|
||||
if (state->render_states[WINED3DRS_ZENABLE] || state->render_states[WINED3DRS_ZWRITEENABLE] ||
|
||||
state->render_states[WINED3DRS_STENCILENABLE])
|
||||
if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE]
|
||||
|| state->render_states[WINED3D_RS_STENCILENABLE])
|
||||
{
|
||||
struct wined3d_surface *ds = device->fb.depth_stencil;
|
||||
struct wined3d_surface *target = device->fb.render_targets[0];
|
||||
|
@ -4949,14 +4949,14 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
|
|||
if (!prev != !depth_stencil)
|
||||
{
|
||||
/* Swapping NULL / non NULL depth stencil affects the depth and tests */
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_ZENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_STENCILENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_DEPTHBIAS));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_ZENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS));
|
||||
}
|
||||
else if (prev && prev->resource.format->depth_size != depth_stencil->resource.format->depth_size)
|
||||
{
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3DRS_DEPTHBIAS));
|
||||
device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS));
|
||||
}
|
||||
if (prev)
|
||||
wined3d_surface_decref(prev);
|
||||
|
|
|
@ -143,10 +143,10 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
specular = element->data.addr;
|
||||
|
||||
/* special case where the fog density is stored in the specular alpha channel */
|
||||
if (state->render_states[WINED3DRS_FOGENABLE]
|
||||
&& (state->render_states[WINED3DRS_FOGVERTEXMODE] == WINED3DFOG_NONE
|
||||
if (state->render_states[WINED3D_RS_FOGENABLE]
|
||||
&& (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3DFOG_NONE
|
||||
|| si->elements[WINED3D_FFP_POSITION].format->id == WINED3DFMT_R32G32B32A32_FLOAT)
|
||||
&& state->render_states[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
&& state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
{
|
||||
if (gl_info->supported[EXT_FOG_COORD])
|
||||
{
|
||||
|
@ -583,7 +583,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
|
||||
if (!index_count) return;
|
||||
|
||||
if (state->render_states[WINED3DRS_COLORWRITEENABLE])
|
||||
if (state->render_states[WINED3D_RS_COLORWRITEENABLE])
|
||||
{
|
||||
/* Invalidate the back buffer memory so LockRect will read it the next time */
|
||||
for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i)
|
||||
|
@ -616,7 +616,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
* depthstencil for D3DCMP_NEVER and D3DCMP_ALWAYS as well. Also note
|
||||
* that we never copy the stencil data.*/
|
||||
DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
|
||||
if (state->render_states[WINED3DRS_ZWRITEENABLE] || state->render_states[WINED3DRS_ZENABLE])
|
||||
if (state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_ZENABLE])
|
||||
{
|
||||
struct wined3d_surface *ds = device->fb.depth_stencil;
|
||||
RECT current_rect, draw_rect, r;
|
||||
|
@ -635,7 +635,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
if (!EqualRect(&r, &draw_rect))
|
||||
surface_load_ds_location(ds, context, location);
|
||||
|
||||
if (state->render_states[WINED3DRS_ZWRITEENABLE])
|
||||
if (state->render_states[WINED3D_RS_ZWRITEENABLE])
|
||||
{
|
||||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
surface_modify_location(ds, ds->draw_binding, TRUE);
|
||||
|
@ -653,7 +653,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
if ((!context->gl_info->supported[WINED3D_GL_VERSION_2_0]
|
||||
|| (!glPointParameteri && !context->gl_info->supported[NV_POINT_SPRITE]))
|
||||
&& context->render_offscreen
|
||||
&& state->render_states[WINED3DRS_POINTSPRITEENABLE]
|
||||
&& state->render_states[WINED3D_RS_POINTSPRITEENABLE]
|
||||
&& state->gl_primitive_type == GL_POINTS)
|
||||
{
|
||||
FIXME("Point sprite coordinate origin switching not supported.\n");
|
||||
|
@ -671,7 +671,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
if (!use_vs(state))
|
||||
{
|
||||
if (!stream_info->position_transformed && context->num_untracked_materials
|
||||
&& state->render_states[WINED3DRS_LIGHTING])
|
||||
&& state->render_states[WINED3D_RS_LIGHTING])
|
||||
{
|
||||
static BOOL warned;
|
||||
if (!warned) {
|
||||
|
@ -682,7 +682,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
}
|
||||
emulation = TRUE;
|
||||
}
|
||||
else if (context->fog_coord && state->render_states[WINED3DRS_FOGENABLE])
|
||||
else if (context->fog_coord && state->render_states[WINED3D_RS_FOGENABLE])
|
||||
{
|
||||
/* Either write a pipeline replacement shader or convert the specular alpha from unsigned byte
|
||||
* to a float in the vertex buffer
|
||||
|
@ -875,7 +875,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
|
|||
*/
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
checkGLcall("glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_FILLMODE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_FILLMODE));
|
||||
if (patch->has_normals)
|
||||
{
|
||||
static const GLfloat black[] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
|
@ -887,7 +887,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
|
|||
checkGLcall("glEnable(GL_LIGHTING)");
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, black);
|
||||
checkGLcall("glLightModel for MODEL_AMBIENT");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_AMBIENT));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_AMBIENT));
|
||||
|
||||
for (i = 3; i < context->gl_info->limits.lights; ++i)
|
||||
{
|
||||
|
@ -919,7 +919,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
|
|||
checkGLcall("Setting up light 3");
|
||||
|
||||
context_invalidate_state(context, STATE_MATERIAL);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORVERTEX));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORVERTEX));
|
||||
glDisable(GL_COLOR_MATERIAL);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, black);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
|
||||
|
|
|
@ -612,7 +612,8 @@ static void nvrc_texfactor(struct wined3d_context *context, const struct wined3d
|
|||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
float col[4];
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3DRS_TEXTUREFACTOR], col);
|
||||
|
||||
D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col);
|
||||
GL_EXTCALL(glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, &col[0]));
|
||||
}
|
||||
|
||||
|
@ -821,15 +822,15 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] = {
|
|||
{ STATE_TEXTURESTAGE(7, WINED3DTSS_ALPHAARG0), { STATE_TEXTURESTAGE(7, WINED3DTSS_ALPHAOP), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_TEXTURESTAGE(7, WINED3DTSS_RESULTARG), { STATE_TEXTURESTAGE(7, WINED3DTSS_COLOROP), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_PIXELSHADER, { STATE_PIXELSHADER, apply_pixelshader }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_SRGBWRITEENABLE), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_TEXTUREFACTOR), { STATE_RENDER(WINED3DRS_TEXTUREFACTOR), nvrc_texfactor }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGCOLOR), { STATE_RENDER(WINED3DRS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGDENSITY), { STATE_RENDER(WINED3DRS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGENABLE), { STATE_RENDER(WINED3DRS_FOGENABLE), state_fog_fragpart }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGTABLEMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGVERTEXMODE), { STATE_RENDER(WINED3DRS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGSTART), { STATE_RENDER(WINED3DRS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3DRS_FOGEND), { STATE_RENDER(WINED3DRS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), { STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), nvrc_texfactor }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGCOLOR), { STATE_RENDER(WINED3D_RS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGDENSITY), { STATE_RENDER(WINED3D_RS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGENABLE), { STATE_RENDER(WINED3D_RS_FOGENABLE), state_fog_fragpart }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGTABLEMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGVERTEXMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGSTART), { STATE_RENDER(WINED3D_RS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_RENDER(WINED3D_RS_FOGEND), { STATE_RENDER(WINED3D_RS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_SAMPLER(0), { STATE_SAMPLER(0), nvts_texdim }, NV_TEXTURE_SHADER2 },
|
||||
{ STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler_texdim }, WINED3D_GL_EXT_NONE },
|
||||
{ STATE_SAMPLER(1), { STATE_SAMPLER(1), nvts_texdim }, NV_TEXTURE_SHADER2 },
|
||||
|
|
|
@ -1709,10 +1709,10 @@ HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *sh
|
|||
void find_vs_compile_args(const struct wined3d_state *state,
|
||||
const struct wined3d_shader *shader, struct vs_compile_args *args)
|
||||
{
|
||||
args->fog_src = state->render_states[WINED3DRS_FOGTABLEMODE]
|
||||
args->fog_src = state->render_states[WINED3D_RS_FOGTABLEMODE]
|
||||
== WINED3DFOG_NONE ? VS_FOG_COORD : VS_FOG_Z;
|
||||
args->clip_enabled = state->render_states[WINED3DRS_CLIPPING]
|
||||
&& state->render_states[WINED3DRS_CLIPPLANEENABLE];
|
||||
args->clip_enabled = state->render_states[WINED3D_RS_CLIPPING]
|
||||
&& state->render_states[WINED3D_RS_CLIPPLANEENABLE];
|
||||
args->swizzle_map = shader->device->strided_streams.swizzle_map;
|
||||
}
|
||||
|
||||
|
@ -1899,7 +1899,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
|
|||
UINT i;
|
||||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */
|
||||
if (state->render_states[WINED3DRS_SRGBWRITEENABLE])
|
||||
if (state->render_states[WINED3D_RS_SRGBWRITEENABLE])
|
||||
{
|
||||
const struct wined3d_surface *rt = state->fb->render_targets[0];
|
||||
if (rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1;
|
||||
|
@ -1976,9 +1976,9 @@ void find_ps_compile_args(const struct wined3d_state *state,
|
|||
else
|
||||
{
|
||||
args->vp_mode = vertexshader;
|
||||
if (state->render_states[WINED3DRS_FOGENABLE])
|
||||
if (state->render_states[WINED3D_RS_FOGENABLE])
|
||||
{
|
||||
switch (state->render_states[WINED3DRS_FOGTABLEMODE])
|
||||
switch (state->render_states[WINED3D_RS_FOGTABLEMODE])
|
||||
{
|
||||
case WINED3DFOG_NONE:
|
||||
if (device->strided_streams.position_transformed || use_vs(state))
|
||||
|
@ -1987,7 +1987,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
|
|||
break;
|
||||
}
|
||||
|
||||
switch (state->render_states[WINED3DRS_FOGVERTEXMODE])
|
||||
switch (state->render_states[WINED3D_RS_FOGVERTEXMODE])
|
||||
{
|
||||
case WINED3DFOG_NONE: /* Fall through. */
|
||||
case WINED3DFOG_LINEAR: args->fog = FOG_LINEAR; break;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -29,66 +29,66 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
|||
|
||||
static const DWORD pixel_states_render[] =
|
||||
{
|
||||
WINED3DRS_ALPHABLENDENABLE,
|
||||
WINED3DRS_ALPHAFUNC,
|
||||
WINED3DRS_ALPHAREF,
|
||||
WINED3DRS_ALPHATESTENABLE,
|
||||
WINED3DRS_ANTIALIASEDLINEENABLE,
|
||||
WINED3DRS_BLENDFACTOR,
|
||||
WINED3DRS_BLENDOP,
|
||||
WINED3DRS_BLENDOPALPHA,
|
||||
WINED3DRS_CCW_STENCILFAIL,
|
||||
WINED3DRS_CCW_STENCILPASS,
|
||||
WINED3DRS_CCW_STENCILZFAIL,
|
||||
WINED3DRS_COLORWRITEENABLE,
|
||||
WINED3DRS_COLORWRITEENABLE1,
|
||||
WINED3DRS_COLORWRITEENABLE2,
|
||||
WINED3DRS_COLORWRITEENABLE3,
|
||||
WINED3DRS_DEPTHBIAS,
|
||||
WINED3DRS_DESTBLEND,
|
||||
WINED3DRS_DESTBLENDALPHA,
|
||||
WINED3DRS_DITHERENABLE,
|
||||
WINED3DRS_FILLMODE,
|
||||
WINED3DRS_FOGDENSITY,
|
||||
WINED3DRS_FOGEND,
|
||||
WINED3DRS_FOGSTART,
|
||||
WINED3DRS_LASTPIXEL,
|
||||
WINED3DRS_SCISSORTESTENABLE,
|
||||
WINED3DRS_SEPARATEALPHABLENDENABLE,
|
||||
WINED3DRS_SHADEMODE,
|
||||
WINED3DRS_SLOPESCALEDEPTHBIAS,
|
||||
WINED3DRS_SRCBLEND,
|
||||
WINED3DRS_SRCBLENDALPHA,
|
||||
WINED3DRS_SRGBWRITEENABLE,
|
||||
WINED3DRS_STENCILENABLE,
|
||||
WINED3DRS_STENCILFAIL,
|
||||
WINED3DRS_STENCILFUNC,
|
||||
WINED3DRS_STENCILMASK,
|
||||
WINED3DRS_STENCILPASS,
|
||||
WINED3DRS_STENCILREF,
|
||||
WINED3DRS_STENCILWRITEMASK,
|
||||
WINED3DRS_STENCILZFAIL,
|
||||
WINED3DRS_TEXTUREFACTOR,
|
||||
WINED3DRS_TWOSIDEDSTENCILMODE,
|
||||
WINED3DRS_WRAP0,
|
||||
WINED3DRS_WRAP1,
|
||||
WINED3DRS_WRAP10,
|
||||
WINED3DRS_WRAP11,
|
||||
WINED3DRS_WRAP12,
|
||||
WINED3DRS_WRAP13,
|
||||
WINED3DRS_WRAP14,
|
||||
WINED3DRS_WRAP15,
|
||||
WINED3DRS_WRAP2,
|
||||
WINED3DRS_WRAP3,
|
||||
WINED3DRS_WRAP4,
|
||||
WINED3DRS_WRAP5,
|
||||
WINED3DRS_WRAP6,
|
||||
WINED3DRS_WRAP7,
|
||||
WINED3DRS_WRAP8,
|
||||
WINED3DRS_WRAP9,
|
||||
WINED3DRS_ZENABLE,
|
||||
WINED3DRS_ZFUNC,
|
||||
WINED3DRS_ZWRITEENABLE,
|
||||
WINED3D_RS_ALPHABLENDENABLE,
|
||||
WINED3D_RS_ALPHAFUNC,
|
||||
WINED3D_RS_ALPHAREF,
|
||||
WINED3D_RS_ALPHATESTENABLE,
|
||||
WINED3D_RS_ANTIALIASEDLINEENABLE,
|
||||
WINED3D_RS_BLENDFACTOR,
|
||||
WINED3D_RS_BLENDOP,
|
||||
WINED3D_RS_BLENDOPALPHA,
|
||||
WINED3D_RS_CCW_STENCILFAIL,
|
||||
WINED3D_RS_CCW_STENCILPASS,
|
||||
WINED3D_RS_CCW_STENCILZFAIL,
|
||||
WINED3D_RS_COLORWRITEENABLE,
|
||||
WINED3D_RS_COLORWRITEENABLE1,
|
||||
WINED3D_RS_COLORWRITEENABLE2,
|
||||
WINED3D_RS_COLORWRITEENABLE3,
|
||||
WINED3D_RS_DEPTHBIAS,
|
||||
WINED3D_RS_DESTBLEND,
|
||||
WINED3D_RS_DESTBLENDALPHA,
|
||||
WINED3D_RS_DITHERENABLE,
|
||||
WINED3D_RS_FILLMODE,
|
||||
WINED3D_RS_FOGDENSITY,
|
||||
WINED3D_RS_FOGEND,
|
||||
WINED3D_RS_FOGSTART,
|
||||
WINED3D_RS_LASTPIXEL,
|
||||
WINED3D_RS_SCISSORTESTENABLE,
|
||||
WINED3D_RS_SEPARATEALPHABLENDENABLE,
|
||||
WINED3D_RS_SHADEMODE,
|
||||
WINED3D_RS_SLOPESCALEDEPTHBIAS,
|
||||
WINED3D_RS_SRCBLEND,
|
||||
WINED3D_RS_SRCBLENDALPHA,
|
||||
WINED3D_RS_SRGBWRITEENABLE,
|
||||
WINED3D_RS_STENCILENABLE,
|
||||
WINED3D_RS_STENCILFAIL,
|
||||
WINED3D_RS_STENCILFUNC,
|
||||
WINED3D_RS_STENCILMASK,
|
||||
WINED3D_RS_STENCILPASS,
|
||||
WINED3D_RS_STENCILREF,
|
||||
WINED3D_RS_STENCILWRITEMASK,
|
||||
WINED3D_RS_STENCILZFAIL,
|
||||
WINED3D_RS_TEXTUREFACTOR,
|
||||
WINED3D_RS_TWOSIDEDSTENCILMODE,
|
||||
WINED3D_RS_WRAP0,
|
||||
WINED3D_RS_WRAP1,
|
||||
WINED3D_RS_WRAP10,
|
||||
WINED3D_RS_WRAP11,
|
||||
WINED3D_RS_WRAP12,
|
||||
WINED3D_RS_WRAP13,
|
||||
WINED3D_RS_WRAP14,
|
||||
WINED3D_RS_WRAP15,
|
||||
WINED3D_RS_WRAP2,
|
||||
WINED3D_RS_WRAP3,
|
||||
WINED3D_RS_WRAP4,
|
||||
WINED3D_RS_WRAP5,
|
||||
WINED3D_RS_WRAP6,
|
||||
WINED3D_RS_WRAP7,
|
||||
WINED3D_RS_WRAP8,
|
||||
WINED3D_RS_WRAP9,
|
||||
WINED3D_RS_ZENABLE,
|
||||
WINED3D_RS_ZFUNC,
|
||||
WINED3D_RS_ZWRITEENABLE,
|
||||
};
|
||||
|
||||
static const DWORD pixel_states_texture[] =
|
||||
|
@ -130,51 +130,51 @@ static const DWORD pixel_states_sampler[] =
|
|||
|
||||
static const DWORD vertex_states_render[] =
|
||||
{
|
||||
WINED3DRS_ADAPTIVETESS_W,
|
||||
WINED3DRS_ADAPTIVETESS_X,
|
||||
WINED3DRS_ADAPTIVETESS_Y,
|
||||
WINED3DRS_ADAPTIVETESS_Z,
|
||||
WINED3DRS_AMBIENT,
|
||||
WINED3DRS_AMBIENTMATERIALSOURCE,
|
||||
WINED3DRS_CLIPPING,
|
||||
WINED3DRS_CLIPPLANEENABLE,
|
||||
WINED3DRS_COLORVERTEX,
|
||||
WINED3DRS_CULLMODE,
|
||||
WINED3DRS_DIFFUSEMATERIALSOURCE,
|
||||
WINED3DRS_EMISSIVEMATERIALSOURCE,
|
||||
WINED3DRS_ENABLEADAPTIVETESSELLATION,
|
||||
WINED3DRS_FOGCOLOR,
|
||||
WINED3DRS_FOGDENSITY,
|
||||
WINED3DRS_FOGENABLE,
|
||||
WINED3DRS_FOGEND,
|
||||
WINED3DRS_FOGSTART,
|
||||
WINED3DRS_FOGTABLEMODE,
|
||||
WINED3DRS_FOGVERTEXMODE,
|
||||
WINED3DRS_INDEXEDVERTEXBLENDENABLE,
|
||||
WINED3DRS_LIGHTING,
|
||||
WINED3DRS_LOCALVIEWER,
|
||||
WINED3DRS_MAXTESSELLATIONLEVEL,
|
||||
WINED3DRS_MINTESSELLATIONLEVEL,
|
||||
WINED3DRS_MULTISAMPLEANTIALIAS,
|
||||
WINED3DRS_MULTISAMPLEMASK,
|
||||
WINED3DRS_NORMALDEGREE,
|
||||
WINED3DRS_NORMALIZENORMALS,
|
||||
WINED3DRS_PATCHEDGESTYLE,
|
||||
WINED3DRS_POINTSCALE_A,
|
||||
WINED3DRS_POINTSCALE_B,
|
||||
WINED3DRS_POINTSCALE_C,
|
||||
WINED3DRS_POINTSCALEENABLE,
|
||||
WINED3DRS_POINTSIZE,
|
||||
WINED3DRS_POINTSIZE_MAX,
|
||||
WINED3DRS_POINTSIZE_MIN,
|
||||
WINED3DRS_POINTSPRITEENABLE,
|
||||
WINED3DRS_POSITIONDEGREE,
|
||||
WINED3DRS_RANGEFOGENABLE,
|
||||
WINED3DRS_SHADEMODE,
|
||||
WINED3DRS_SPECULARENABLE,
|
||||
WINED3DRS_SPECULARMATERIALSOURCE,
|
||||
WINED3DRS_TWEENFACTOR,
|
||||
WINED3DRS_VERTEXBLEND,
|
||||
WINED3D_RS_ADAPTIVETESS_W,
|
||||
WINED3D_RS_ADAPTIVETESS_X,
|
||||
WINED3D_RS_ADAPTIVETESS_Y,
|
||||
WINED3D_RS_ADAPTIVETESS_Z,
|
||||
WINED3D_RS_AMBIENT,
|
||||
WINED3D_RS_AMBIENTMATERIALSOURCE,
|
||||
WINED3D_RS_CLIPPING,
|
||||
WINED3D_RS_CLIPPLANEENABLE,
|
||||
WINED3D_RS_COLORVERTEX,
|
||||
WINED3D_RS_CULLMODE,
|
||||
WINED3D_RS_DIFFUSEMATERIALSOURCE,
|
||||
WINED3D_RS_EMISSIVEMATERIALSOURCE,
|
||||
WINED3D_RS_ENABLEADAPTIVETESSELLATION,
|
||||
WINED3D_RS_FOGCOLOR,
|
||||
WINED3D_RS_FOGDENSITY,
|
||||
WINED3D_RS_FOGENABLE,
|
||||
WINED3D_RS_FOGEND,
|
||||
WINED3D_RS_FOGSTART,
|
||||
WINED3D_RS_FOGTABLEMODE,
|
||||
WINED3D_RS_FOGVERTEXMODE,
|
||||
WINED3D_RS_INDEXEDVERTEXBLENDENABLE,
|
||||
WINED3D_RS_LIGHTING,
|
||||
WINED3D_RS_LOCALVIEWER,
|
||||
WINED3D_RS_MAXTESSELLATIONLEVEL,
|
||||
WINED3D_RS_MINTESSELLATIONLEVEL,
|
||||
WINED3D_RS_MULTISAMPLEANTIALIAS,
|
||||
WINED3D_RS_MULTISAMPLEMASK,
|
||||
WINED3D_RS_NORMALDEGREE,
|
||||
WINED3D_RS_NORMALIZENORMALS,
|
||||
WINED3D_RS_PATCHEDGESTYLE,
|
||||
WINED3D_RS_POINTSCALE_A,
|
||||
WINED3D_RS_POINTSCALE_B,
|
||||
WINED3D_RS_POINTSCALE_C,
|
||||
WINED3D_RS_POINTSCALEENABLE,
|
||||
WINED3D_RS_POINTSIZE,
|
||||
WINED3D_RS_POINTSIZE_MAX,
|
||||
WINED3D_RS_POINTSIZE_MIN,
|
||||
WINED3D_RS_POINTSPRITEENABLE,
|
||||
WINED3D_RS_POSITIONDEGREE,
|
||||
WINED3D_RS_RANGEFOGENABLE,
|
||||
WINED3D_RS_SHADEMODE,
|
||||
WINED3D_RS_SPECULARENABLE,
|
||||
WINED3D_RS_SPECULARMATERIALSOURCE,
|
||||
WINED3D_RS_TWEENFACTOR,
|
||||
WINED3D_RS_VERTEXBLEND,
|
||||
};
|
||||
|
||||
static const DWORD vertex_states_texture[] =
|
||||
|
@ -838,7 +838,7 @@ HRESULT CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
|
|||
/* Render */
|
||||
for (i = 0; i < stateblock->num_contained_render_states; ++i)
|
||||
{
|
||||
WINED3DRENDERSTATETYPE rs = stateblock->contained_render_states[i];
|
||||
enum wined3d_render_state rs = stateblock->contained_render_states[i];
|
||||
|
||||
TRACE("Updating render state %#x to %u.\n", rs, src_state->render_states[rs]);
|
||||
|
||||
|
@ -1120,134 +1120,134 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
|
|||
TRACE("Render states\n");
|
||||
/* Render states: */
|
||||
if (device->auto_depth_stencil)
|
||||
state->render_states[WINED3DRS_ZENABLE] = WINED3DZB_TRUE;
|
||||
state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_TRUE;
|
||||
else
|
||||
state->render_states[WINED3DRS_ZENABLE] = WINED3DZB_FALSE;
|
||||
state->render_states[WINED3DRS_FILLMODE] = WINED3DFILL_SOLID;
|
||||
state->render_states[WINED3DRS_SHADEMODE] = WINED3DSHADE_GOURAUD;
|
||||
state->render_states[WINED3D_RS_ZENABLE] = WINED3DZB_FALSE;
|
||||
state->render_states[WINED3D_RS_FILLMODE] = WINED3DFILL_SOLID;
|
||||
state->render_states[WINED3D_RS_SHADEMODE] = WINED3DSHADE_GOURAUD;
|
||||
lp.lp.repeat_factor = 0;
|
||||
lp.lp.line_pattern = 0;
|
||||
state->render_states[WINED3DRS_LINEPATTERN] = lp.d;
|
||||
state->render_states[WINED3DRS_ZWRITEENABLE] = TRUE;
|
||||
state->render_states[WINED3DRS_ALPHATESTENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_LASTPIXEL] = TRUE;
|
||||
state->render_states[WINED3DRS_SRCBLEND] = WINED3D_BLEND_ONE;
|
||||
state->render_states[WINED3DRS_DESTBLEND] = WINED3D_BLEND_ZERO;
|
||||
state->render_states[WINED3DRS_CULLMODE] = WINED3DCULL_CCW;
|
||||
state->render_states[WINED3DRS_ZFUNC] = WINED3DCMP_LESSEQUAL;
|
||||
state->render_states[WINED3DRS_ALPHAFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3DRS_ALPHAREF] = 0;
|
||||
state->render_states[WINED3DRS_DITHERENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_ALPHABLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_FOGENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_SPECULARENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_ZVISIBLE] = 0;
|
||||
state->render_states[WINED3DRS_FOGCOLOR] = 0;
|
||||
state->render_states[WINED3DRS_FOGTABLEMODE] = WINED3DFOG_NONE;
|
||||
state->render_states[WINED3D_RS_LINEPATTERN] = lp.d;
|
||||
state->render_states[WINED3D_RS_ZWRITEENABLE] = TRUE;
|
||||
state->render_states[WINED3D_RS_ALPHATESTENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_LASTPIXEL] = TRUE;
|
||||
state->render_states[WINED3D_RS_SRCBLEND] = WINED3D_BLEND_ONE;
|
||||
state->render_states[WINED3D_RS_DESTBLEND] = WINED3D_BLEND_ZERO;
|
||||
state->render_states[WINED3D_RS_CULLMODE] = WINED3DCULL_CCW;
|
||||
state->render_states[WINED3D_RS_ZFUNC] = WINED3DCMP_LESSEQUAL;
|
||||
state->render_states[WINED3D_RS_ALPHAFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3D_RS_ALPHAREF] = 0;
|
||||
state->render_states[WINED3D_RS_DITHERENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_ALPHABLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_FOGENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_SPECULARENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_ZVISIBLE] = 0;
|
||||
state->render_states[WINED3D_RS_FOGCOLOR] = 0;
|
||||
state->render_states[WINED3D_RS_FOGTABLEMODE] = WINED3DFOG_NONE;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_FOGSTART] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_FOGSTART] = tmpfloat.d;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_FOGEND] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_FOGEND] = tmpfloat.d;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_FOGDENSITY] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_EDGEANTIALIAS] = FALSE;
|
||||
state->render_states[WINED3DRS_RANGEFOGENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_STENCILENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_STENCILFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_STENCILZFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_STENCILPASS] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_STENCILREF] = 0;
|
||||
state->render_states[WINED3DRS_STENCILMASK] = 0xffffffff;
|
||||
state->render_states[WINED3DRS_STENCILFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3DRS_STENCILWRITEMASK] = 0xffffffff;
|
||||
state->render_states[WINED3DRS_TEXTUREFACTOR] = 0xffffffff;
|
||||
state->render_states[WINED3DRS_WRAP0] = 0;
|
||||
state->render_states[WINED3DRS_WRAP1] = 0;
|
||||
state->render_states[WINED3DRS_WRAP2] = 0;
|
||||
state->render_states[WINED3DRS_WRAP3] = 0;
|
||||
state->render_states[WINED3DRS_WRAP4] = 0;
|
||||
state->render_states[WINED3DRS_WRAP5] = 0;
|
||||
state->render_states[WINED3DRS_WRAP6] = 0;
|
||||
state->render_states[WINED3DRS_WRAP7] = 0;
|
||||
state->render_states[WINED3DRS_CLIPPING] = TRUE;
|
||||
state->render_states[WINED3DRS_LIGHTING] = TRUE;
|
||||
state->render_states[WINED3DRS_AMBIENT] = 0;
|
||||
state->render_states[WINED3DRS_FOGVERTEXMODE] = WINED3DFOG_NONE;
|
||||
state->render_states[WINED3DRS_COLORVERTEX] = TRUE;
|
||||
state->render_states[WINED3DRS_LOCALVIEWER] = TRUE;
|
||||
state->render_states[WINED3DRS_NORMALIZENORMALS] = FALSE;
|
||||
state->render_states[WINED3DRS_DIFFUSEMATERIALSOURCE] = WINED3DMCS_COLOR1;
|
||||
state->render_states[WINED3DRS_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2;
|
||||
state->render_states[WINED3DRS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL;
|
||||
state->render_states[WINED3DRS_EMISSIVEMATERIALSOURCE] = WINED3DMCS_MATERIAL;
|
||||
state->render_states[WINED3DRS_VERTEXBLEND] = WINED3DVBF_DISABLE;
|
||||
state->render_states[WINED3DRS_CLIPPLANEENABLE] = 0;
|
||||
state->render_states[WINED3DRS_SOFTWAREVERTEXPROCESSING] = FALSE;
|
||||
state->render_states[WINED3D_RS_FOGDENSITY] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_EDGEANTIALIAS] = FALSE;
|
||||
state->render_states[WINED3D_RS_RANGEFOGENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_STENCILENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_STENCILFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_STENCILZFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_STENCILPASS] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_STENCILREF] = 0;
|
||||
state->render_states[WINED3D_RS_STENCILMASK] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_STENCILFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3D_RS_STENCILWRITEMASK] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_TEXTUREFACTOR] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_WRAP0] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP1] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP2] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP3] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP4] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP5] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP6] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP7] = 0;
|
||||
state->render_states[WINED3D_RS_CLIPPING] = TRUE;
|
||||
state->render_states[WINED3D_RS_LIGHTING] = TRUE;
|
||||
state->render_states[WINED3D_RS_AMBIENT] = 0;
|
||||
state->render_states[WINED3D_RS_FOGVERTEXMODE] = WINED3DFOG_NONE;
|
||||
state->render_states[WINED3D_RS_COLORVERTEX] = TRUE;
|
||||
state->render_states[WINED3D_RS_LOCALVIEWER] = TRUE;
|
||||
state->render_states[WINED3D_RS_NORMALIZENORMALS] = FALSE;
|
||||
state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] = WINED3DMCS_COLOR1;
|
||||
state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] = WINED3DMCS_COLOR2;
|
||||
state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] = WINED3DMCS_MATERIAL;
|
||||
state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] = WINED3DMCS_MATERIAL;
|
||||
state->render_states[WINED3D_RS_VERTEXBLEND] = WINED3DVBF_DISABLE;
|
||||
state->render_states[WINED3D_RS_CLIPPLANEENABLE] = 0;
|
||||
state->render_states[WINED3D_RS_SOFTWAREVERTEXPROCESSING] = FALSE;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_POINTSIZE] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_POINTSIZE] = tmpfloat.d;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_POINTSIZE_MIN] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_POINTSPRITEENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_POINTSCALEENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_POINTSIZE_MIN] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_POINTSPRITEENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_POINTSCALEENABLE] = FALSE;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_POINTSCALE_A] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_POINTSCALE_A] = tmpfloat.d;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_POINTSCALE_B] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_POINTSCALE_B] = tmpfloat.d;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_POINTSCALE_C] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_MULTISAMPLEANTIALIAS] = TRUE;
|
||||
state->render_states[WINED3DRS_MULTISAMPLEMASK] = 0xffffffff;
|
||||
state->render_states[WINED3DRS_PATCHEDGESTYLE] = WINED3DPATCHEDGE_DISCRETE;
|
||||
state->render_states[WINED3D_RS_POINTSCALE_C] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_MULTISAMPLEANTIALIAS] = TRUE;
|
||||
state->render_states[WINED3D_RS_MULTISAMPLEMASK] = 0xffffffff;
|
||||
state->render_states[WINED3D_RS_PATCHEDGESTYLE] = WINED3DPATCHEDGE_DISCRETE;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_PATCHSEGMENTS] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_DEBUGMONITORTOKEN] = 0xbaadcafe;
|
||||
state->render_states[WINED3D_RS_PATCHSEGMENTS] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_DEBUGMONITORTOKEN] = 0xbaadcafe;
|
||||
tmpfloat.f = gl_info->limits.pointsize_max;
|
||||
state->render_states[WINED3DRS_POINTSIZE_MAX] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_INDEXEDVERTEXBLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_COLORWRITEENABLE] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_POINTSIZE_MAX] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_INDEXEDVERTEXBLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE] = 0x0000000f;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_TWEENFACTOR] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_BLENDOP] = WINED3D_BLEND_OP_ADD;
|
||||
state->render_states[WINED3DRS_POSITIONDEGREE] = WINED3D_DEGREE_CUBIC;
|
||||
state->render_states[WINED3DRS_NORMALDEGREE] = WINED3D_DEGREE_LINEAR;
|
||||
state->render_states[WINED3D_RS_TWEENFACTOR] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_BLENDOP] = WINED3D_BLEND_OP_ADD;
|
||||
state->render_states[WINED3D_RS_POSITIONDEGREE] = WINED3D_DEGREE_CUBIC;
|
||||
state->render_states[WINED3D_RS_NORMALDEGREE] = WINED3D_DEGREE_LINEAR;
|
||||
/* states new in d3d9 */
|
||||
state->render_states[WINED3DRS_SCISSORTESTENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_SLOPESCALEDEPTHBIAS] = 0;
|
||||
state->render_states[WINED3D_RS_SCISSORTESTENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_SLOPESCALEDEPTHBIAS] = 0;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_MINTESSELLATIONLEVEL] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_MAXTESSELLATIONLEVEL] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_ANTIALIASEDLINEENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_MINTESSELLATIONLEVEL] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_MAXTESSELLATIONLEVEL] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ANTIALIASEDLINEENABLE] = FALSE;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_ADAPTIVETESS_X] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_ADAPTIVETESS_Y] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ADAPTIVETESS_X] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ADAPTIVETESS_Y] = tmpfloat.d;
|
||||
tmpfloat.f = 1.0f;
|
||||
state->render_states[WINED3DRS_ADAPTIVETESS_Z] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ADAPTIVETESS_Z] = tmpfloat.d;
|
||||
tmpfloat.f = 0.0f;
|
||||
state->render_states[WINED3DRS_ADAPTIVETESS_W] = tmpfloat.d;
|
||||
state->render_states[WINED3DRS_ENABLEADAPTIVETESSELLATION] = FALSE;
|
||||
state->render_states[WINED3DRS_TWOSIDEDSTENCILMODE] = FALSE;
|
||||
state->render_states[WINED3DRS_CCW_STENCILFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_CCW_STENCILZFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_CCW_STENCILPASS] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3DRS_CCW_STENCILFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3DRS_COLORWRITEENABLE1] = 0x0000000f;
|
||||
state->render_states[WINED3DRS_COLORWRITEENABLE2] = 0x0000000f;
|
||||
state->render_states[WINED3DRS_COLORWRITEENABLE3] = 0x0000000f;
|
||||
state->render_states[WINED3DRS_BLENDFACTOR] = 0xFFFFFFFF;
|
||||
state->render_states[WINED3DRS_SRGBWRITEENABLE] = 0;
|
||||
state->render_states[WINED3DRS_DEPTHBIAS] = 0;
|
||||
state->render_states[WINED3DRS_WRAP8] = 0;
|
||||
state->render_states[WINED3DRS_WRAP9] = 0;
|
||||
state->render_states[WINED3DRS_WRAP10] = 0;
|
||||
state->render_states[WINED3DRS_WRAP11] = 0;
|
||||
state->render_states[WINED3DRS_WRAP12] = 0;
|
||||
state->render_states[WINED3DRS_WRAP13] = 0;
|
||||
state->render_states[WINED3DRS_WRAP14] = 0;
|
||||
state->render_states[WINED3DRS_WRAP15] = 0;
|
||||
state->render_states[WINED3DRS_SEPARATEALPHABLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3DRS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
|
||||
state->render_states[WINED3DRS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
|
||||
state->render_states[WINED3DRS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
|
||||
state->render_states[WINED3D_RS_ADAPTIVETESS_W] = tmpfloat.d;
|
||||
state->render_states[WINED3D_RS_ENABLEADAPTIVETESSELLATION] = FALSE;
|
||||
state->render_states[WINED3D_RS_TWOSIDEDSTENCILMODE] = FALSE;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILZFAIL] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILPASS] = WINED3DSTENCILOP_KEEP;
|
||||
state->render_states[WINED3D_RS_CCW_STENCILFUNC] = WINED3DCMP_ALWAYS;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE1] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE2] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_COLORWRITEENABLE3] = 0x0000000f;
|
||||
state->render_states[WINED3D_RS_BLENDFACTOR] = 0xFFFFFFFF;
|
||||
state->render_states[WINED3D_RS_SRGBWRITEENABLE] = 0;
|
||||
state->render_states[WINED3D_RS_DEPTHBIAS] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP8] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP9] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP10] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP11] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP12] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP13] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP14] = 0;
|
||||
state->render_states[WINED3D_RS_WRAP15] = 0;
|
||||
state->render_states[WINED3D_RS_SEPARATEALPHABLENDENABLE] = FALSE;
|
||||
state->render_states[WINED3D_RS_SRCBLENDALPHA] = WINED3D_BLEND_ONE;
|
||||
state->render_states[WINED3D_RS_DESTBLENDALPHA] = WINED3D_BLEND_ZERO;
|
||||
state->render_states[WINED3D_RS_BLENDOPALPHA] = WINED3D_BLEND_OP_ADD;
|
||||
|
||||
/* Texture Stage States - Put directly into state block, we will call function below */
|
||||
for (i = 0; i < MAX_TEXTURES; ++i)
|
||||
|
|
|
@ -1077,21 +1077,21 @@ static void wined3d_surface_depth_blt_fbo(const struct wined3d_device *device, s
|
|||
if (gl_mask & GL_DEPTH_BUFFER_BIT)
|
||||
{
|
||||
glDepthMask(GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_ZWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZWRITEENABLE));
|
||||
}
|
||||
if (gl_mask & GL_STENCIL_BUFFER_BIT)
|
||||
{
|
||||
if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE])
|
||||
{
|
||||
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_TWOSIDEDSTENCILMODE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE));
|
||||
}
|
||||
glStencilMask(~0U);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_STENCILWRITEMASK));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
}
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
|
||||
gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom,
|
||||
dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, gl_mask, GL_NEAREST);
|
||||
|
@ -1206,13 +1206,13 @@ static void surface_blt_fbo(const struct wined3d_device *device, const WINED3DTE
|
|||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
|
||||
gl_info->fbo_ops.glBlitFramebuffer(src_rect.left, src_rect.top, src_rect.right, src_rect.bottom,
|
||||
dst_rect.left, dst_rect.top, dst_rect.right, dst_rect.bottom, GL_COLOR_BUFFER_BIT, gl_filter);
|
||||
|
|
|
@ -327,13 +327,13 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
|||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_COLORWRITEENABLE3));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3DRS_SCISSORTESTENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
|
||||
/* Note that the texture is upside down */
|
||||
gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom,
|
||||
|
|
|
@ -2016,137 +2016,137 @@ const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
|
|||
}
|
||||
}
|
||||
|
||||
const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state)
|
||||
const char *debug_d3drenderstate(enum wined3d_render_state state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
#define D3DSTATE_TO_STR(u) case u: return #u
|
||||
D3DSTATE_TO_STR(WINED3DRS_ANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_TEXTUREPERSPECTIVE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAPU);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAPV);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ZENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FILLMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SHADEMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_LINEPATTERN);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MONOENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ROP2);
|
||||
D3DSTATE_TO_STR(WINED3DRS_PLANEMASK);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ZWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ALPHATESTENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_LASTPIXEL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SRCBLEND);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DESTBLEND);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CULLMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ZFUNC);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ALPHAREF);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ALPHAFUNC);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DITHERENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ALPHABLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SPECULARENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ZVISIBLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SUBPIXEL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SUBPIXELX);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STIPPLEDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGCOLOR);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGTABLEMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGSTART);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGEND);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGDENSITY);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STIPPLEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_EDGEANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORKEYENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MIPMAPLODBIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_RANGEFOGENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ANISOTROPY);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FLUSHBATCH);
|
||||
D3DSTATE_TO_STR(WINED3DRS_TRANSLUCENTSORTINDEPENDENT);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILREF);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILMASK);
|
||||
D3DSTATE_TO_STR(WINED3DRS_STENCILWRITEMASK);
|
||||
D3DSTATE_TO_STR(WINED3DRS_TEXTUREFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP0);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP1);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP2);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP3);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP4);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP5);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP6);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP7);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CLIPPING);
|
||||
D3DSTATE_TO_STR(WINED3DRS_LIGHTING);
|
||||
D3DSTATE_TO_STR(WINED3DRS_EXTENTS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_AMBIENT);
|
||||
D3DSTATE_TO_STR(WINED3DRS_FOGVERTEXMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORVERTEX);
|
||||
D3DSTATE_TO_STR(WINED3DRS_LOCALVIEWER);
|
||||
D3DSTATE_TO_STR(WINED3DRS_NORMALIZENORMALS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORKEYBLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DIFFUSEMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SPECULARMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_AMBIENTMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_EMISSIVEMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_VERTEXBLEND);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CLIPPLANEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SOFTWAREVERTEXPROCESSING);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSIZE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSIZE_MIN);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSPRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSCALEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSCALE_A);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSCALE_B);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSCALE_C);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MULTISAMPLEANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MULTISAMPLEMASK);
|
||||
D3DSTATE_TO_STR(WINED3DRS_PATCHEDGESTYLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_PATCHSEGMENTS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DEBUGMONITORTOKEN);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POINTSIZE_MAX);
|
||||
D3DSTATE_TO_STR(WINED3DRS_INDEXEDVERTEXBLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_TWEENFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3DRS_BLENDOP);
|
||||
D3DSTATE_TO_STR(WINED3DRS_POSITIONDEGREE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_NORMALDEGREE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SCISSORTESTENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SLOPESCALEDEPTHBIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ANTIALIASEDLINEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MINTESSELLATIONLEVEL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_MAXTESSELLATIONLEVEL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ADAPTIVETESS_X);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ADAPTIVETESS_Y);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ADAPTIVETESS_Z);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ADAPTIVETESS_W);
|
||||
D3DSTATE_TO_STR(WINED3DRS_ENABLEADAPTIVETESSELLATION);
|
||||
D3DSTATE_TO_STR(WINED3DRS_TWOSIDEDSTENCILMODE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CCW_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CCW_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CCW_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_CCW_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORWRITEENABLE1);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORWRITEENABLE2);
|
||||
D3DSTATE_TO_STR(WINED3DRS_COLORWRITEENABLE3);
|
||||
D3DSTATE_TO_STR(WINED3DRS_BLENDFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SRGBWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DEPTHBIAS);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP8);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP9);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP10);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP11);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP12);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP13);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP14);
|
||||
D3DSTATE_TO_STR(WINED3DRS_WRAP15);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SEPARATEALPHABLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3DRS_SRCBLENDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3DRS_DESTBLENDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3DRS_BLENDOPALPHA);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TEXTUREPERSPECTIVE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAPU);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAPV);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ZENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FILLMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SHADEMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_LINEPATTERN);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MONOENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ROP2);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_PLANEMASK);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ZWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ALPHATESTENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_LASTPIXEL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRCBLEND);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DESTBLEND);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CULLMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ZFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ALPHAREF);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ALPHAFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DITHERENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ALPHABLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SPECULARENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ZVISIBLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SUBPIXEL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SUBPIXELX);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STIPPLEDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGCOLOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGTABLEMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGSTART);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGEND);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGDENSITY);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STIPPLEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_EDGEANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORKEYENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MIPMAPLODBIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_RANGEFOGENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ANISOTROPY);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FLUSHBATCH);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TRANSLUCENTSORTINDEPENDENT);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILREF);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILMASK);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_STENCILWRITEMASK);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TEXTUREFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP0);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP1);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP2);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP3);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP4);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP5);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP6);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP7);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CLIPPING);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_LIGHTING);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_EXTENTS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_AMBIENT);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_FOGVERTEXMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORVERTEX);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_LOCALVIEWER);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_NORMALIZENORMALS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORKEYBLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DIFFUSEMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SPECULARMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_AMBIENTMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_EMISSIVEMATERIALSOURCE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_VERTEXBLEND);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CLIPPLANEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SOFTWAREVERTEXPROCESSING);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MIN);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSPRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSCALEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSCALE_A);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSCALE_B);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSCALE_C);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MULTISAMPLEANTIALIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MULTISAMPLEMASK);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_PATCHEDGESTYLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_PATCHSEGMENTS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEBUGMONITORTOKEN);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POINTSIZE_MAX);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_INDEXEDVERTEXBLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TWEENFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDOP);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_POSITIONDEGREE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_NORMALDEGREE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SCISSORTESTENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SLOPESCALEDEPTHBIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ANTIALIASEDLINEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MINTESSELLATIONLEVEL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_MAXTESSELLATIONLEVEL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ADAPTIVETESS_X);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ADAPTIVETESS_Y);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ADAPTIVETESS_Z);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ADAPTIVETESS_W);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_ENABLEADAPTIVETESSELLATION);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_TWOSIDEDSTENCILMODE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILZFAIL);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILPASS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_CCW_STENCILFUNC);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE1);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE2);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_COLORWRITEENABLE3);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDFACTOR);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRGBWRITEENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DEPTHBIAS);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP8);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP9);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP10);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP11);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP12);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP13);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP14);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_WRAP15);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SEPARATEALPHABLENDENABLE);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_SRCBLENDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_DESTBLENDALPHA);
|
||||
D3DSTATE_TO_STR(WINED3D_RS_BLENDOPALPHA);
|
||||
#undef D3DSTATE_TO_STR
|
||||
default:
|
||||
FIXME("Unrecognized %u render state!\n", state);
|
||||
|
@ -2998,7 +2998,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
aarg0 = (args[aop] & ARG0) ? state->texture_states[i][WINED3DTSS_ALPHAARG0] : ARG_UNUSED;
|
||||
}
|
||||
|
||||
if (!i && state->textures[0] && state->render_states[WINED3DRS_COLORKEYENABLE])
|
||||
if (!i && state->textures[0] && state->render_states[WINED3D_RS_COLORKEYENABLE])
|
||||
{
|
||||
GLenum texture_dimensions;
|
||||
|
||||
|
@ -3018,7 +3018,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
}
|
||||
else if (aop == WINED3DTOP_SELECTARG1 && aarg1 != WINED3DTA_TEXTURE)
|
||||
{
|
||||
if (state->render_states[WINED3DRS_ALPHABLENDENABLE])
|
||||
if (state->render_states[WINED3D_RS_ALPHABLENDENABLE])
|
||||
{
|
||||
aarg2 = WINED3DTA_TEXTURE;
|
||||
aop = WINED3DTOP_MODULATE;
|
||||
|
@ -3027,7 +3027,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
}
|
||||
else if (aop == WINED3DTOP_SELECTARG2 && aarg2 != WINED3DTA_TEXTURE)
|
||||
{
|
||||
if (state->render_states[WINED3DRS_ALPHABLENDENABLE])
|
||||
if (state->render_states[WINED3D_RS_ALPHABLENDENABLE])
|
||||
{
|
||||
aarg1 = WINED3DTA_TEXTURE;
|
||||
aop = WINED3DTOP_MODULATE;
|
||||
|
@ -3082,11 +3082,11 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
memset(&settings->op[i], 0xff, sizeof(settings->op[i]));
|
||||
}
|
||||
|
||||
if (!state->render_states[WINED3DRS_FOGENABLE])
|
||||
if (!state->render_states[WINED3D_RS_FOGENABLE])
|
||||
{
|
||||
settings->fog = FOG_OFF;
|
||||
}
|
||||
else if (state->render_states[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
else if (state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3DFOG_NONE)
|
||||
{
|
||||
if (use_vs(state) || state->vertex_declaration->position_transformed)
|
||||
{
|
||||
|
@ -3094,7 +3094,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
}
|
||||
else
|
||||
{
|
||||
switch (state->render_states[WINED3DRS_FOGVERTEXMODE])
|
||||
switch (state->render_states[WINED3D_RS_FOGVERTEXMODE])
|
||||
{
|
||||
case WINED3DFOG_NONE:
|
||||
case WINED3DFOG_LINEAR:
|
||||
|
@ -3111,7 +3111,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
}
|
||||
else
|
||||
{
|
||||
switch (state->render_states[WINED3DRS_FOGTABLEMODE])
|
||||
switch (state->render_states[WINED3D_RS_FOGTABLEMODE])
|
||||
{
|
||||
case WINED3DFOG_LINEAR:
|
||||
settings->fog = FOG_LINEAR;
|
||||
|
@ -3124,15 +3124,15 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (state->render_states[WINED3DRS_SRGBWRITEENABLE]
|
||||
if (state->render_states[WINED3D_RS_SRGBWRITEENABLE]
|
||||
&& rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE)
|
||||
{
|
||||
settings->sRGB_write = 1;
|
||||
} else {
|
||||
settings->sRGB_write = 0;
|
||||
}
|
||||
if (device->vs_clipping || !use_vs(state) || !state->render_states[WINED3DRS_CLIPPING]
|
||||
|| !state->render_states[WINED3DRS_CLIPPLANEENABLE])
|
||||
if (device->vs_clipping || !use_vs(state) || !state->render_states[WINED3D_RS_CLIPPING]
|
||||
|| !state->render_states[WINED3D_RS_CLIPPLANEENABLE])
|
||||
{
|
||||
/* No need to emulate clipplanes if GL supports native vertex shader clipping or if
|
||||
* the fixed function vertex pipeline is used(which always supports clipplanes), or
|
||||
|
@ -3380,6 +3380,6 @@ void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect)
|
|||
|
||||
SetRect(rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height);
|
||||
|
||||
if (state->render_states[WINED3DRS_SCISSORTESTENABLE])
|
||||
if (state->render_states[WINED3D_RS_SCISSORTESTENABLE])
|
||||
IntersectRect(rect, rect, &state->scissor_rect);
|
||||
}
|
||||
|
|
|
@ -2475,7 +2475,7 @@ const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN;
|
|||
const char *debug_d3ddeclmethod(WINED3DDECLMETHOD method) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3drenderstate(WINED3DRENDERSTATETYPE state) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3drenderstate(enum wined3d_render_state state) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3dsamplerstate(DWORD state) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3dstate(DWORD state) DECLSPEC_HIDDEN;
|
||||
const char *debug_d3dtexturefiltertype(WINED3DTEXTUREFILTERTYPE filter_type) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -252,137 +252,136 @@ enum wined3d_format_id
|
|||
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
||||
};
|
||||
|
||||
typedef enum _WINED3DRENDERSTATETYPE
|
||||
enum wined3d_render_state
|
||||
{
|
||||
WINED3DRS_ANTIALIAS = 2, /* d3d7 */
|
||||
WINED3DRS_TEXTUREPERSPECTIVE = 4, /* d3d7 */
|
||||
WINED3DRS_WRAPU = 5, /* d3d7 */
|
||||
WINED3DRS_WRAPV = 6, /* d3d7 */
|
||||
WINED3DRS_ZENABLE = 7,
|
||||
WINED3DRS_FILLMODE = 8,
|
||||
WINED3DRS_SHADEMODE = 9,
|
||||
WINED3DRS_LINEPATTERN = 10, /* d3d7, d3d8 */
|
||||
WINED3DRS_MONOENABLE = 11, /* d3d7 */
|
||||
WINED3DRS_ROP2 = 12, /* d3d7 */
|
||||
WINED3DRS_PLANEMASK = 13, /* d3d7 */
|
||||
WINED3DRS_ZWRITEENABLE = 14,
|
||||
WINED3DRS_ALPHATESTENABLE = 15,
|
||||
WINED3DRS_LASTPIXEL = 16,
|
||||
WINED3DRS_SRCBLEND = 19,
|
||||
WINED3DRS_DESTBLEND = 20,
|
||||
WINED3DRS_CULLMODE = 22,
|
||||
WINED3DRS_ZFUNC = 23,
|
||||
WINED3DRS_ALPHAREF = 24,
|
||||
WINED3DRS_ALPHAFUNC = 25,
|
||||
WINED3DRS_DITHERENABLE = 26,
|
||||
WINED3DRS_ALPHABLENDENABLE = 27,
|
||||
WINED3DRS_FOGENABLE = 28,
|
||||
WINED3DRS_SPECULARENABLE = 29,
|
||||
WINED3DRS_ZVISIBLE = 30, /* d3d7, d3d8 */
|
||||
WINED3DRS_SUBPIXEL = 31, /* d3d7 */
|
||||
WINED3DRS_SUBPIXELX = 32, /* d3d7 */
|
||||
WINED3DRS_STIPPLEDALPHA = 33, /* d3d7 */
|
||||
WINED3DRS_FOGCOLOR = 34,
|
||||
WINED3DRS_FOGTABLEMODE = 35,
|
||||
WINED3DRS_FOGSTART = 36,
|
||||
WINED3DRS_FOGEND = 37,
|
||||
WINED3DRS_FOGDENSITY = 38,
|
||||
WINED3DRS_STIPPLEENABLE = 39, /* d3d7 */
|
||||
WINED3DRS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */
|
||||
WINED3DRS_COLORKEYENABLE = 41, /* d3d7 */
|
||||
WINED3DRS_MIPMAPLODBIAS = 46, /* d3d7 */
|
||||
WINED3DRS_RANGEFOGENABLE = 48,
|
||||
WINED3DRS_ANISOTROPY = 49, /* d3d7 */
|
||||
WINED3DRS_FLUSHBATCH = 50, /* d3d7 */
|
||||
WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */
|
||||
WINED3DRS_STENCILENABLE = 52,
|
||||
WINED3DRS_STENCILFAIL = 53,
|
||||
WINED3DRS_STENCILZFAIL = 54,
|
||||
WINED3DRS_STENCILPASS = 55,
|
||||
WINED3DRS_STENCILFUNC = 56,
|
||||
WINED3DRS_STENCILREF = 57,
|
||||
WINED3DRS_STENCILMASK = 58,
|
||||
WINED3DRS_STENCILWRITEMASK = 59,
|
||||
WINED3DRS_TEXTUREFACTOR = 60,
|
||||
WINED3DRS_WRAP0 = 128,
|
||||
WINED3DRS_WRAP1 = 129,
|
||||
WINED3DRS_WRAP2 = 130,
|
||||
WINED3DRS_WRAP3 = 131,
|
||||
WINED3DRS_WRAP4 = 132,
|
||||
WINED3DRS_WRAP5 = 133,
|
||||
WINED3DRS_WRAP6 = 134,
|
||||
WINED3DRS_WRAP7 = 135,
|
||||
WINED3DRS_CLIPPING = 136,
|
||||
WINED3DRS_LIGHTING = 137,
|
||||
WINED3DRS_EXTENTS = 138, /* d3d7 */
|
||||
WINED3DRS_AMBIENT = 139,
|
||||
WINED3DRS_FOGVERTEXMODE = 140,
|
||||
WINED3DRS_COLORVERTEX = 141,
|
||||
WINED3DRS_LOCALVIEWER = 142,
|
||||
WINED3DRS_NORMALIZENORMALS = 143,
|
||||
WINED3DRS_COLORKEYBLENDENABLE = 144, /* d3d7 */
|
||||
WINED3DRS_DIFFUSEMATERIALSOURCE = 145,
|
||||
WINED3DRS_SPECULARMATERIALSOURCE = 146,
|
||||
WINED3DRS_AMBIENTMATERIALSOURCE = 147,
|
||||
WINED3DRS_EMISSIVEMATERIALSOURCE = 148,
|
||||
WINED3DRS_VERTEXBLEND = 151,
|
||||
WINED3DRS_CLIPPLANEENABLE = 152,
|
||||
WINED3DRS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */
|
||||
WINED3DRS_POINTSIZE = 154,
|
||||
WINED3DRS_POINTSIZE_MIN = 155,
|
||||
WINED3DRS_POINTSPRITEENABLE = 156,
|
||||
WINED3DRS_POINTSCALEENABLE = 157,
|
||||
WINED3DRS_POINTSCALE_A = 158,
|
||||
WINED3DRS_POINTSCALE_B = 159,
|
||||
WINED3DRS_POINTSCALE_C = 160,
|
||||
WINED3DRS_MULTISAMPLEANTIALIAS = 161,
|
||||
WINED3DRS_MULTISAMPLEMASK = 162,
|
||||
WINED3DRS_PATCHEDGESTYLE = 163,
|
||||
WINED3DRS_PATCHSEGMENTS = 164, /* d3d8 */
|
||||
WINED3DRS_DEBUGMONITORTOKEN = 165,
|
||||
WINED3DRS_POINTSIZE_MAX = 166,
|
||||
WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167,
|
||||
WINED3DRS_COLORWRITEENABLE = 168,
|
||||
WINED3DRS_TWEENFACTOR = 170,
|
||||
WINED3DRS_BLENDOP = 171,
|
||||
WINED3DRS_POSITIONDEGREE = 172,
|
||||
WINED3DRS_NORMALDEGREE = 173,
|
||||
WINED3DRS_SCISSORTESTENABLE = 174,
|
||||
WINED3DRS_SLOPESCALEDEPTHBIAS = 175,
|
||||
WINED3DRS_ANTIALIASEDLINEENABLE = 176,
|
||||
WINED3DRS_MINTESSELLATIONLEVEL = 178,
|
||||
WINED3DRS_MAXTESSELLATIONLEVEL = 179,
|
||||
WINED3DRS_ADAPTIVETESS_X = 180,
|
||||
WINED3DRS_ADAPTIVETESS_Y = 181,
|
||||
WINED3DRS_ADAPTIVETESS_Z = 182,
|
||||
WINED3DRS_ADAPTIVETESS_W = 183,
|
||||
WINED3DRS_ENABLEADAPTIVETESSELLATION = 184,
|
||||
WINED3DRS_TWOSIDEDSTENCILMODE = 185,
|
||||
WINED3DRS_CCW_STENCILFAIL = 186,
|
||||
WINED3DRS_CCW_STENCILZFAIL = 187,
|
||||
WINED3DRS_CCW_STENCILPASS = 188,
|
||||
WINED3DRS_CCW_STENCILFUNC = 189,
|
||||
WINED3DRS_COLORWRITEENABLE1 = 190,
|
||||
WINED3DRS_COLORWRITEENABLE2 = 191,
|
||||
WINED3DRS_COLORWRITEENABLE3 = 192,
|
||||
WINED3DRS_BLENDFACTOR = 193,
|
||||
WINED3DRS_SRGBWRITEENABLE = 194,
|
||||
WINED3DRS_DEPTHBIAS = 195,
|
||||
WINED3DRS_WRAP8 = 198,
|
||||
WINED3DRS_WRAP9 = 199,
|
||||
WINED3DRS_WRAP10 = 200,
|
||||
WINED3DRS_WRAP11 = 201,
|
||||
WINED3DRS_WRAP12 = 202,
|
||||
WINED3DRS_WRAP13 = 203,
|
||||
WINED3DRS_WRAP14 = 204,
|
||||
WINED3DRS_WRAP15 = 205,
|
||||
WINED3DRS_SEPARATEALPHABLENDENABLE = 206,
|
||||
WINED3DRS_SRCBLENDALPHA = 207,
|
||||
WINED3DRS_DESTBLENDALPHA = 208,
|
||||
WINED3DRS_BLENDOPALPHA = 209,
|
||||
WINED3DRS_FORCE_DWORD = 0x7fffffff
|
||||
} WINED3DRENDERSTATETYPE;
|
||||
#define WINEHIGHEST_RENDER_STATE WINED3DRS_BLENDOPALPHA
|
||||
WINED3D_RS_ANTIALIAS = 2, /* d3d7 */
|
||||
WINED3D_RS_TEXTUREPERSPECTIVE = 4, /* d3d7 */
|
||||
WINED3D_RS_WRAPU = 5, /* d3d7 */
|
||||
WINED3D_RS_WRAPV = 6, /* d3d7 */
|
||||
WINED3D_RS_ZENABLE = 7,
|
||||
WINED3D_RS_FILLMODE = 8,
|
||||
WINED3D_RS_SHADEMODE = 9,
|
||||
WINED3D_RS_LINEPATTERN = 10, /* d3d7, d3d8 */
|
||||
WINED3D_RS_MONOENABLE = 11, /* d3d7 */
|
||||
WINED3D_RS_ROP2 = 12, /* d3d7 */
|
||||
WINED3D_RS_PLANEMASK = 13, /* d3d7 */
|
||||
WINED3D_RS_ZWRITEENABLE = 14,
|
||||
WINED3D_RS_ALPHATESTENABLE = 15,
|
||||
WINED3D_RS_LASTPIXEL = 16,
|
||||
WINED3D_RS_SRCBLEND = 19,
|
||||
WINED3D_RS_DESTBLEND = 20,
|
||||
WINED3D_RS_CULLMODE = 22,
|
||||
WINED3D_RS_ZFUNC = 23,
|
||||
WINED3D_RS_ALPHAREF = 24,
|
||||
WINED3D_RS_ALPHAFUNC = 25,
|
||||
WINED3D_RS_DITHERENABLE = 26,
|
||||
WINED3D_RS_ALPHABLENDENABLE = 27,
|
||||
WINED3D_RS_FOGENABLE = 28,
|
||||
WINED3D_RS_SPECULARENABLE = 29,
|
||||
WINED3D_RS_ZVISIBLE = 30, /* d3d7, d3d8 */
|
||||
WINED3D_RS_SUBPIXEL = 31, /* d3d7 */
|
||||
WINED3D_RS_SUBPIXELX = 32, /* d3d7 */
|
||||
WINED3D_RS_STIPPLEDALPHA = 33, /* d3d7 */
|
||||
WINED3D_RS_FOGCOLOR = 34,
|
||||
WINED3D_RS_FOGTABLEMODE = 35,
|
||||
WINED3D_RS_FOGSTART = 36,
|
||||
WINED3D_RS_FOGEND = 37,
|
||||
WINED3D_RS_FOGDENSITY = 38,
|
||||
WINED3D_RS_STIPPLEENABLE = 39, /* d3d7 */
|
||||
WINED3D_RS_EDGEANTIALIAS = 40, /* d3d7, d3d8 */
|
||||
WINED3D_RS_COLORKEYENABLE = 41, /* d3d7 */
|
||||
WINED3D_RS_MIPMAPLODBIAS = 46, /* d3d7 */
|
||||
WINED3D_RS_RANGEFOGENABLE = 48,
|
||||
WINED3D_RS_ANISOTROPY = 49, /* d3d7 */
|
||||
WINED3D_RS_FLUSHBATCH = 50, /* d3d7 */
|
||||
WINED3D_RS_TRANSLUCENTSORTINDEPENDENT = 51, /* d3d7 */
|
||||
WINED3D_RS_STENCILENABLE = 52,
|
||||
WINED3D_RS_STENCILFAIL = 53,
|
||||
WINED3D_RS_STENCILZFAIL = 54,
|
||||
WINED3D_RS_STENCILPASS = 55,
|
||||
WINED3D_RS_STENCILFUNC = 56,
|
||||
WINED3D_RS_STENCILREF = 57,
|
||||
WINED3D_RS_STENCILMASK = 58,
|
||||
WINED3D_RS_STENCILWRITEMASK = 59,
|
||||
WINED3D_RS_TEXTUREFACTOR = 60,
|
||||
WINED3D_RS_WRAP0 = 128,
|
||||
WINED3D_RS_WRAP1 = 129,
|
||||
WINED3D_RS_WRAP2 = 130,
|
||||
WINED3D_RS_WRAP3 = 131,
|
||||
WINED3D_RS_WRAP4 = 132,
|
||||
WINED3D_RS_WRAP5 = 133,
|
||||
WINED3D_RS_WRAP6 = 134,
|
||||
WINED3D_RS_WRAP7 = 135,
|
||||
WINED3D_RS_CLIPPING = 136,
|
||||
WINED3D_RS_LIGHTING = 137,
|
||||
WINED3D_RS_EXTENTS = 138, /* d3d7 */
|
||||
WINED3D_RS_AMBIENT = 139,
|
||||
WINED3D_RS_FOGVERTEXMODE = 140,
|
||||
WINED3D_RS_COLORVERTEX = 141,
|
||||
WINED3D_RS_LOCALVIEWER = 142,
|
||||
WINED3D_RS_NORMALIZENORMALS = 143,
|
||||
WINED3D_RS_COLORKEYBLENDENABLE = 144, /* d3d7 */
|
||||
WINED3D_RS_DIFFUSEMATERIALSOURCE = 145,
|
||||
WINED3D_RS_SPECULARMATERIALSOURCE = 146,
|
||||
WINED3D_RS_AMBIENTMATERIALSOURCE = 147,
|
||||
WINED3D_RS_EMISSIVEMATERIALSOURCE = 148,
|
||||
WINED3D_RS_VERTEXBLEND = 151,
|
||||
WINED3D_RS_CLIPPLANEENABLE = 152,
|
||||
WINED3D_RS_SOFTWAREVERTEXPROCESSING = 153, /* d3d8 */
|
||||
WINED3D_RS_POINTSIZE = 154,
|
||||
WINED3D_RS_POINTSIZE_MIN = 155,
|
||||
WINED3D_RS_POINTSPRITEENABLE = 156,
|
||||
WINED3D_RS_POINTSCALEENABLE = 157,
|
||||
WINED3D_RS_POINTSCALE_A = 158,
|
||||
WINED3D_RS_POINTSCALE_B = 159,
|
||||
WINED3D_RS_POINTSCALE_C = 160,
|
||||
WINED3D_RS_MULTISAMPLEANTIALIAS = 161,
|
||||
WINED3D_RS_MULTISAMPLEMASK = 162,
|
||||
WINED3D_RS_PATCHEDGESTYLE = 163,
|
||||
WINED3D_RS_PATCHSEGMENTS = 164, /* d3d8 */
|
||||
WINED3D_RS_DEBUGMONITORTOKEN = 165,
|
||||
WINED3D_RS_POINTSIZE_MAX = 166,
|
||||
WINED3D_RS_INDEXEDVERTEXBLENDENABLE = 167,
|
||||
WINED3D_RS_COLORWRITEENABLE = 168,
|
||||
WINED3D_RS_TWEENFACTOR = 170,
|
||||
WINED3D_RS_BLENDOP = 171,
|
||||
WINED3D_RS_POSITIONDEGREE = 172,
|
||||
WINED3D_RS_NORMALDEGREE = 173,
|
||||
WINED3D_RS_SCISSORTESTENABLE = 174,
|
||||
WINED3D_RS_SLOPESCALEDEPTHBIAS = 175,
|
||||
WINED3D_RS_ANTIALIASEDLINEENABLE = 176,
|
||||
WINED3D_RS_MINTESSELLATIONLEVEL = 178,
|
||||
WINED3D_RS_MAXTESSELLATIONLEVEL = 179,
|
||||
WINED3D_RS_ADAPTIVETESS_X = 180,
|
||||
WINED3D_RS_ADAPTIVETESS_Y = 181,
|
||||
WINED3D_RS_ADAPTIVETESS_Z = 182,
|
||||
WINED3D_RS_ADAPTIVETESS_W = 183,
|
||||
WINED3D_RS_ENABLEADAPTIVETESSELLATION = 184,
|
||||
WINED3D_RS_TWOSIDEDSTENCILMODE = 185,
|
||||
WINED3D_RS_CCW_STENCILFAIL = 186,
|
||||
WINED3D_RS_CCW_STENCILZFAIL = 187,
|
||||
WINED3D_RS_CCW_STENCILPASS = 188,
|
||||
WINED3D_RS_CCW_STENCILFUNC = 189,
|
||||
WINED3D_RS_COLORWRITEENABLE1 = 190,
|
||||
WINED3D_RS_COLORWRITEENABLE2 = 191,
|
||||
WINED3D_RS_COLORWRITEENABLE3 = 192,
|
||||
WINED3D_RS_BLENDFACTOR = 193,
|
||||
WINED3D_RS_SRGBWRITEENABLE = 194,
|
||||
WINED3D_RS_DEPTHBIAS = 195,
|
||||
WINED3D_RS_WRAP8 = 198,
|
||||
WINED3D_RS_WRAP9 = 199,
|
||||
WINED3D_RS_WRAP10 = 200,
|
||||
WINED3D_RS_WRAP11 = 201,
|
||||
WINED3D_RS_WRAP12 = 202,
|
||||
WINED3D_RS_WRAP13 = 203,
|
||||
WINED3D_RS_WRAP14 = 204,
|
||||
WINED3D_RS_WRAP15 = 205,
|
||||
WINED3D_RS_SEPARATEALPHABLENDENABLE = 206,
|
||||
WINED3D_RS_SRCBLENDALPHA = 207,
|
||||
WINED3D_RS_DESTBLENDALPHA = 208,
|
||||
WINED3D_RS_BLENDOPALPHA = 209,
|
||||
};
|
||||
#define WINEHIGHEST_RENDER_STATE WINED3D_RS_BLENDOPALPHA
|
||||
|
||||
enum wined3d_blend
|
||||
{
|
||||
|
@ -2144,7 +2143,7 @@ HRESULT __cdecl wined3d_device_get_ps_consts_i(const struct wined3d_device *devi
|
|||
HRESULT __cdecl wined3d_device_get_raster_status(const struct wined3d_device *device,
|
||||
UINT swapchain_idx, struct wined3d_raster_status *raster_status);
|
||||
HRESULT __cdecl wined3d_device_get_render_state(const struct wined3d_device *device,
|
||||
WINED3DRENDERSTATETYPE state, DWORD *value);
|
||||
enum wined3d_render_state state, DWORD *value);
|
||||
HRESULT __cdecl wined3d_device_get_render_target(const struct wined3d_device *device,
|
||||
UINT render_target_idx, struct wined3d_surface **render_target);
|
||||
HRESULT __cdecl wined3d_device_get_sampler_state(const struct wined3d_device *device,
|
||||
|
@ -2223,7 +2222,7 @@ HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device,
|
|||
HRESULT __cdecl wined3d_device_set_ps_consts_i(struct wined3d_device *device,
|
||||
UINT start_register, const int *constants, UINT vector4i_count);
|
||||
HRESULT __cdecl wined3d_device_set_render_state(struct wined3d_device *device,
|
||||
WINED3DRENDERSTATETYPE state, DWORD value);
|
||||
enum wined3d_render_state state, DWORD value);
|
||||
HRESULT __cdecl wined3d_device_set_render_target(struct wined3d_device *device,
|
||||
UINT render_target_idx, struct wined3d_surface *render_target, BOOL set_viewport);
|
||||
HRESULT __cdecl wined3d_device_set_sampler_state(struct wined3d_device *device,
|
||||
|
|
Loading…
Reference in New Issue