wined3d: Pass a wined3d_context_gl structure to wined3d_texture_gl_bind().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6811cc6414
commit
5fcffb10f7
|
@ -3617,7 +3617,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
|
|||
|
||||
wined3d_sampler_desc_from_sampler_states(&desc, context, sampler_states, texture_gl);
|
||||
|
||||
wined3d_texture_gl_bind(texture_gl, context, srgb);
|
||||
wined3d_texture_gl_bind(texture_gl, context_gl, srgb);
|
||||
|
||||
if ((entry = wine_rb_get(&device->samplers, &desc)))
|
||||
{
|
||||
|
|
|
@ -934,18 +934,17 @@ void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_
|
|||
|
||||
/* Context activation is done by the caller. */
|
||||
void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
struct wined3d_context_gl *context_gl, BOOL srgb)
|
||||
{
|
||||
struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
|
||||
const struct wined3d_format *format = texture_gl->t.resource.format;
|
||||
const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
|
||||
const struct color_fixup_desc fixup = format->color_fixup;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct gl_texture *gl_tex;
|
||||
GLenum target;
|
||||
|
||||
TRACE("texture_gl %p, context %p, srgb %#x.\n", texture_gl, context, srgb);
|
||||
TRACE("texture_gl %p, context_gl %p, srgb %#x.\n", texture_gl, context_gl, srgb);
|
||||
|
||||
if (!needs_separate_srgb_gl_texture(context, &texture_gl->t))
|
||||
if (!needs_separate_srgb_gl_texture(&context_gl->c, &texture_gl->t))
|
||||
srgb = FALSE;
|
||||
|
||||
/* sRGB mode cache for preload() calls outside drawprim. */
|
||||
|
@ -988,7 +987,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
|
|||
gl_tex->sampler_desc.max_anisotropy = 1;
|
||||
gl_tex->sampler_desc.compare = FALSE;
|
||||
gl_tex->sampler_desc.comparison_func = WINED3D_CMP_LESSEQUAL;
|
||||
if (context->gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE])
|
||||
gl_tex->sampler_desc.srgb_decode = TRUE;
|
||||
else
|
||||
gl_tex->sampler_desc.srgb_decode = srgb;
|
||||
|
@ -1046,7 +1045,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
|
|||
checkGLcall("glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)");
|
||||
}
|
||||
|
||||
if (!is_identity_fixup(fixup) && can_use_texture_swizzle(context->d3d_info, format))
|
||||
if (!is_identity_fixup(fixup) && can_use_texture_swizzle(context_gl->c.d3d_info, format))
|
||||
{
|
||||
GLint swizzle[4];
|
||||
|
||||
|
@ -1080,7 +1079,7 @@ void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
|
|||
context_invalidate_compute_state(&context_gl->c, STATE_COMPUTE_SHADER_RESOURCE_BINDING);
|
||||
context_invalidate_state(&context_gl->c, STATE_GRAPHICS_SHADER_RESOURCE_BINDING);
|
||||
|
||||
wined3d_texture_gl_bind(texture_gl, &context_gl->c, srgb);
|
||||
wined3d_texture_gl_bind(texture_gl, context_gl, srgb);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller (state handler). */
|
||||
|
|
|
@ -850,7 +850,7 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
|
|||
}
|
||||
|
||||
texture_gl = wined3d_texture_gl(wined3d_texture_from_resource(view_gl->v.resource));
|
||||
wined3d_texture_gl_bind(texture_gl, context, FALSE);
|
||||
wined3d_texture_gl_bind(texture_gl, context_gl, FALSE);
|
||||
wined3d_sampler_bind(sampler, unit, texture_gl, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -3620,7 +3620,7 @@ static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct win
|
|||
void wined3d_texture_gl_apply_sampler_desc(struct wined3d_texture_gl *texture_gl,
|
||||
const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
|
||||
struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
|
||||
struct wined3d_context_gl *context_gl, BOOL srgb) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_gl_prepare_texture(struct wined3d_texture_gl *texture_gl,
|
||||
|
|
Loading…
Reference in New Issue