wined3d: Use a separate STATE_VIEWPORT state handler in the GLSL pipeline.

This commit is contained in:
Matteo Bruni 2015-03-20 13:50:52 +01:00 committed by Alexandre Julliard
parent 70c6666d1e
commit 65c8c40b18
3 changed files with 13 additions and 4 deletions

View File

@ -7100,6 +7100,17 @@ static void glsl_vertex_pipe_projection(struct wined3d_context *context,
transform_projection(context, state, state_id); transform_projection(context, state, state_id);
} }
static void glsl_vertex_pipe_viewport(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id)
{
if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)))
glsl_vertex_pipe_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));
if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))
&& state->render_states[WINED3D_RS_POINTSCALEENABLE])
state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE));
context->constant_update_mask |= WINED3D_SHADER_CONST_VS_POS_FIXUP;
}
static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
{ {
{STATE_VDECL, {STATE_VDECL, glsl_vertex_pipe_vdecl }, WINED3D_GL_EXT_NONE }, {STATE_VDECL, {STATE_VDECL, glsl_vertex_pipe_vdecl }, WINED3D_GL_EXT_NONE },
@ -7150,7 +7161,7 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
{STATE_ACTIVELIGHT(6), {STATE_ACTIVELIGHT(6), light }, WINED3D_GL_EXT_NONE }, {STATE_ACTIVELIGHT(6), {STATE_ACTIVELIGHT(6), light }, WINED3D_GL_EXT_NONE },
{STATE_ACTIVELIGHT(7), {STATE_ACTIVELIGHT(7), light }, WINED3D_GL_EXT_NONE }, {STATE_ACTIVELIGHT(7), {STATE_ACTIVELIGHT(7), light }, WINED3D_GL_EXT_NONE },
/* Viewport */ /* Viewport */
{STATE_VIEWPORT, {STATE_VIEWPORT, viewport_vertexpart }, WINED3D_GL_EXT_NONE }, {STATE_VIEWPORT, {STATE_VIEWPORT, glsl_vertex_pipe_viewport}, WINED3D_GL_EXT_NONE },
/* Transform states */ /* Transform states */
{STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), glsl_vertex_pipe_view }, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), glsl_vertex_pipe_view }, WINED3D_GL_EXT_NONE },
{STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE }, {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE },

View File

@ -4790,7 +4790,7 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine
checkGLcall("glViewport"); checkGLcall("glViewport");
} }
void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) static void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
{ {
if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)))
transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));

View File

@ -2814,8 +2814,6 @@ void transform_texture(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void state_ambient(struct wined3d_context *context, void state_ambient(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void viewport_vertexpart(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void state_clipping(struct wined3d_context *context, void state_clipping(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN;
void light(struct wined3d_context *context, void light(struct wined3d_context *context,