=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Pass position_transformed and gl_info to find_ps_compile_args.
Alexandre Julliard
julliard at winehq.org
Wed Sep 11 16:01:45 CDT 2013
Module: wine
Branch: master
Commit: b4d8b52fa76b04d4af74b699345d75603690bc4f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b4d8b52fa76b04d4af74b699345d75603690bc4f
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Wed Sep 11 11:31:18 2013 +0200
wined3d: Pass position_transformed and gl_info to find_ps_compile_args.
---
dlls/wined3d/arb_program_shader.c | 3 ++-
dlls/wined3d/glsl_shader.c | 2 +-
dlls/wined3d/shader.c | 10 ++++------
dlls/wined3d/wined3d_private.h | 5 +++--
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 6ebd7fd..2972e19 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -4521,12 +4521,13 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state,
const struct wined3d_context *context, const struct wined3d_shader *shader,
struct arb_ps_compile_args *args)
{
+ const struct wined3d_device *device = shader->device;
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
int i;
WORD int_skip;
- find_ps_compile_args(state, shader, &args->super);
+ find_ps_compile_args(state, shader, device->stream_info.position_transformed, &args->super, gl_info);
/* This forces all local boolean constants to 1 to make them stateblock independent */
args->bools = shader->reg_maps.local_bool_consts;
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 0bd1180..2413095 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -5837,7 +5837,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
{
struct ps_compile_args ps_compile_args;
pshader = state->pixel_shader;
- find_ps_compile_args(state, pshader, &ps_compile_args);
+ find_ps_compile_args(state, pshader, device->stream_info.position_transformed, &ps_compile_args, gl_info);
ps_id = find_glsl_pshader(context, &priv->shader_buffer,
pshader, &ps_compile_args, &np2fixup_info);
ps_list = &pshader->linked_programs;
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 3eee934..fee9c77 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -2025,11 +2025,9 @@ static HRESULT geometryshader_init(struct wined3d_shader *shader, struct wined3d
return WINED3D_OK;
}
-void find_ps_compile_args(const struct wined3d_state *state,
- const struct wined3d_shader *shader, struct ps_compile_args *args)
+void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
+ BOOL position_transformed, struct ps_compile_args *args, const struct wined3d_gl_info *gl_info)
{
- struct wined3d_device *device = shader->device;
- const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
const struct wined3d_texture *texture;
UINT i;
@@ -2158,7 +2156,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
}
if (shader->reg_maps.shader_version.major >= 3)
{
- if (device->stream_info.position_transformed)
+ if (position_transformed)
args->vp_mode = pretransformed;
else if (use_vs(state))
args->vp_mode = vertexshader;
@@ -2174,7 +2172,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
switch (state->render_states[WINED3D_RS_FOGTABLEMODE])
{
case WINED3D_FOG_NONE:
- if (device->stream_info.position_transformed || use_vs(state))
+ if (position_transformed || use_vs(state))
{
args->fog = WINED3D_FFP_PS_FOG_LINEAR;
break;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 9cabceb..3548094 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2774,8 +2774,9 @@ struct wined3d_shader
};
void pixelshader_update_samplers(struct wined3d_shader *shader, WORD tex_types) DECLSPEC_HIDDEN;
-void find_ps_compile_args(const struct wined3d_state *state,
- const struct wined3d_shader *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN;
+void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
+ BOOL position_transformed, struct ps_compile_args *args,
+ const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
WORD swizzle_map, struct vs_compile_args *args) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list