*input = d3dta_to_combiner_input(arg & WINED3DTA_SELECTMASK, stage, texture_idx);
}
-void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst) {
- IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl*)iface;
- const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
+void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d_state *state, BOOL is_alpha,
+ int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst)
+{
tex_op_args tex_op_args = {{0}, {0}, {0}};
GLenum portion = is_alpha ? GL_ALPHA : GL_RGB;
GLenum target = GL_COMBINER0_NV + stage;
/* If a texture stage references an invalid texture unit the stage just
* passes through the result from the previous stage */
- if (is_invalid_op(&This->stateBlock->state, stage, op, arg1, arg2, arg3))
+ if (is_invalid_op(state, stage, op, arg1, arg2, arg3))
{
arg1 = WINED3DTA_CURRENT;
op = WINED3DTOP_SELECTARG1;
}
/* Set the texture combiners */
- set_tex_op_nvrc((IWineD3DDevice *)stateblock->device, FALSE, stage,
+ set_tex_op_nvrc(gl_info, &stateblock->state, FALSE, stage,
stateblock->state.texture_states[stage][WINED3DTSS_COLOROP],
stateblock->state.texture_states[stage][WINED3DTSS_COLORARG1],
stateblock->state.texture_states[stage][WINED3DTSS_COLORARG2],
TRACE("Setting alpha op for stage %d\n", stage);
if (gl_info->supported[NV_REGISTER_COMBINERS])
{
- set_tex_op_nvrc((IWineD3DDevice *)stateblock->device, TRUE, stage, op, arg1, arg2, arg0,
+ set_tex_op_nvrc(gl_info, &stateblock->state, TRUE, stage, op, arg1, arg2, arg0,
mapped_stage, stateblock->state.texture_states[stage][WINED3DTSS_RESULTARG]);
}
else
GLenum CompareFunc(DWORD func) DECLSPEC_HIDDEN;
BOOL is_invalid_op(const struct wined3d_state *state, int stage,
WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3) DECLSPEC_HIDDEN;
-void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEXTUREOP op,
- DWORD arg1, DWORD arg2, DWORD arg3, INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
+void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d_state *state,
+ BOOL is_alpha, int stage, WINED3DTEXTUREOP op, DWORD arg1, DWORD arg2, DWORD arg3,
+ INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
BOOL transformed, enum wined3d_format_id coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock,