Commit af1ba676 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Pass a gl_info structure to fragment_pipeline.enable_extension().

parent 4b90d794
......@@ -5585,7 +5585,7 @@ struct arbfp_ffp_desc
};
/* Context activation and GL locking are done by the caller. */
static void arbfp_enable(BOOL enable)
static void arbfp_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
{
if(enable) {
glEnable(GL_FRAGMENT_PROGRAM_ARB);
......
......@@ -1093,7 +1093,7 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = {
};
/* Context activation and GL locking are done by the caller. */
static void atifs_enable(BOOL enable)
static void atifs_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
{
if(enable) {
glEnable(GL_FRAGMENT_SHADER_ATI);
......
......@@ -1569,7 +1569,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
{
GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT));
}
device->frag_pipe->enable_extension(TRUE);
device->frag_pipe->enable_extension(gl_info, TRUE);
/* If this happens to be the first context for the device, dummy textures
* are not created yet. In that case, they will be created (and bound) by
......@@ -1866,7 +1866,7 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CLIPPING));
set_blit_dimension(rt_size.cx, rt_size.cy);
device->frag_pipe->enable_extension(FALSE);
device->frag_pipe->enable_extension(gl_info, FALSE);
LEAVE_GL();
......@@ -2139,6 +2139,7 @@ static BOOL context_validate_rt_config(UINT rt_count,
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device,
UINT rt_count, const struct wined3d_fb_state *fb)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
DWORD rt_mask = 0, *cur_mask;
UINT i;
struct wined3d_surface **rts = fb->render_targets;
......@@ -2221,7 +2222,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
if (context->last_was_blit)
{
device->frag_pipe->enable_extension(TRUE);
device->frag_pipe->enable_extension(gl_info, TRUE);
context->last_was_blit = FALSE;
}
......@@ -2349,9 +2350,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de
ENTER_GL();
if (context->last_was_blit)
{
device->frag_pipe->enable_extension(TRUE);
}
device->frag_pipe->enable_extension(context->gl_info, TRUE);
for (i = 0; i < context->numDirtyEntries; ++i)
{
......@@ -2491,7 +2490,7 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str
else
{
ENTER_GL();
device->frag_pipe->enable_extension(!context->last_was_blit);
device->frag_pipe->enable_extension(context->gl_info, !context->last_was_blit);
LEAVE_GL();
}
}
......
......@@ -630,7 +630,7 @@ static void nvrc_texfactor(struct wined3d_context *context, const struct wined3d
}
/* Context activation is done by the caller. */
static void nvrc_enable(BOOL enable)
static void nvrc_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
{
if (enable)
{
......@@ -645,9 +645,9 @@ static void nvrc_enable(BOOL enable)
}
/* Context activation and GL locking are done by the caller. */
static void nvts_enable(BOOL enable)
static void nvts_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
{
nvrc_enable(enable);
nvrc_enable(gl_info, enable);
if (enable)
{
glEnable(GL_TEXTURE_SHADER_NV);
......
......@@ -5571,7 +5571,7 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = {
};
/* Context activation and GL locking are done by the caller. */
static void ffp_enable(BOOL enable) {}
static void ffp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {}
static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps)
{
......
......@@ -1166,7 +1166,7 @@ struct fragment_caps
struct fragment_pipeline
{
void (*enable_extension)(BOOL enable);
void (*enable_extension)(const struct wined3d_gl_info *gl_info, BOOL enable);
void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps);
HRESULT (*alloc_private)(struct wined3d_device *device);
void (*free_private)(struct wined3d_device *device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment