wined3d: Pass position_transformed and gl_info to find_ps_compile_args.

This commit is contained in:
Stefan Dösinger 2013-09-11 11:31:18 +02:00 committed by Alexandre Julliard
parent dfeee9077c
commit b4d8b52fa7
4 changed files with 10 additions and 10 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;