Fixes: 04453496a22d4b9a8f4ff50e48166b4928b937f5 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Thanks to Matteo Bruni for spotting this one.
dlls/wined3d/context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index e4f174b9f1..0761dd6379 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4471,7 +4471,7 @@ static void wined3d_context_gl_setup_target(struct wined3d_context_gl *context_g /* Update sRGB writing when switching between formats that do/do not support sRGB writing */ if ((context_gl->c.current_rt.texture->resource.format_flags & WINED3DFMT_FLAG_SRGB_WRITE) != (texture->resource.format_flags & WINED3DFMT_FLAG_SRGB_WRITE)) - context_invalidate_state(&context_gl->c, STATE_BLEND); + context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE)); }
/* When switching away from an offscreen render target, and we're not
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/context.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0761dd6379..d9e3dfaa50 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -5105,6 +5105,15 @@ static GLenum gl_tfb_primitive_type_from_d3d(enum wined3d_primitive_type primiti } }
+static unsigned int get_render_target_writemask(const struct wined3d_blend_state *state, unsigned int index) +{ + if (!state) + return 0xf; + if (!state->desc.independent) + index = 0; + return state->desc.rt[index].writemask; +} + /* Routine common to the draw primitive and draw indexed primitive routines */ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters) @@ -5154,7 +5163,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s if (!(rtv = fb->render_targets[i]) || rtv->format->id == WINED3DFMT_NULL) continue;
- if (!state->blend_state || state->blend_state->desc.rt[0].writemask) + if (get_render_target_writemask(state->blend_state, i)) { wined3d_rendertarget_view_load_location(rtv, context, rtv->resource->draw_binding); wined3d_rendertarget_view_invalidate_location(rtv, ~rtv->resource->draw_binding);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/adapter_gl.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 1860dd4bd0..3a6d1bdd2b 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -2180,6 +2180,11 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) USE_GL_FUNC(glGetDebugMessageLogARB) /* GL_ARB_draw_buffers */ USE_GL_FUNC(glDrawBuffersARB) + /* GL_ARB_draw_buffers_blend */ + USE_GL_FUNC(glBlendEquationiARB) + USE_GL_FUNC(glBlendEquationSeparateiARB) + USE_GL_FUNC(glBlendFunciARB) + USE_GL_FUNC(glBlendFuncSeparateiARB) /* GL_ARB_draw_elements_base_vertex */ USE_GL_FUNC(glDrawElementsBaseVertex) USE_GL_FUNC(glDrawElementsInstancedBaseVertex) @@ -2821,8 +2826,12 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) MAP_GL_FUNCTION(glBindFragDataLocation, glBindFragDataLocationEXT); MAP_GL_FUNCTION(glBlendColor, glBlendColorEXT); MAP_GL_FUNCTION(glBlendEquation, glBlendEquationEXT); + MAP_GL_FUNCTION(glBlendEquationi, glBlendEquationiARB); MAP_GL_FUNCTION(glBlendEquationSeparate, glBlendEquationSeparateEXT); + MAP_GL_FUNCTION(glBlendEquationSeparatei, glBlendEquationSeparateiARB); + MAP_GL_FUNCTION(glBlendFunci, glBlendFunciARB); MAP_GL_FUNCTION(glBlendFuncSeparate, glBlendFuncSeparateEXT); + MAP_GL_FUNCTION(glBlendFuncSeparatei, glBlendFuncSeparateiARB); MAP_GL_FUNCTION(glBufferData, glBufferDataARB); MAP_GL_FUNCTION(glBufferSubData, glBufferSubDataARB); MAP_GL_FUNCTION(glColorMaski, glColorMaskIndexedEXT);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/adapter_gl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 3a6d1bdd2b..2fd061b74a 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -1311,7 +1311,6 @@ static enum wined3d_feature_level feature_level_from_caps(const struct wined3d_g
if (gl_info->supported[WINED3D_GL_VERSION_3_2] && gl_info->supported[ARB_POLYGON_OFFSET_CLAMP] - && gl_info->supported[ARB_DRAW_BUFFERS_BLEND] && gl_info->supported[ARB_SAMPLER_OBJECTS]) { if (shader_model >= 5 @@ -1321,7 +1320,8 @@ static enum wined3d_feature_level feature_level_from_caps(const struct wined3d_g
if (shader_model >= 4) { - if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY]) + if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY] + && gl_info->supported[ARB_DRAW_BUFFERS_BLEND]) return WINED3D_FEATURE_LEVEL_10_1; return WINED3D_FEATURE_LEVEL_10; }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com