Commit aa59d40a authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Implement source fixups in the GLSL blitter.

parent 40496c90
...@@ -12270,8 +12270,8 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter ...@@ -12270,8 +12270,8 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter
"\n" "\n"
"void main()\n" "void main()\n"
"{\n"; "{\n";
struct wined3d_string_buffer *buffer, *string;
GLuint program, vshader_id, fshader_id; GLuint program, vshader_id, fshader_id;
struct wined3d_string_buffer *buffer;
const char *tex_type, *swizzle, *ptr; const char *tex_type, *swizzle, *ptr;
unsigned int i; unsigned int i;
...@@ -12314,9 +12314,14 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter ...@@ -12314,9 +12314,14 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter
declare_in_varying(gl_info, buffer, FALSE, "vec3 out_texcoord;\n"); declare_in_varying(gl_info, buffer, FALSE, "vec3 out_texcoord;\n");
if (!needs_legacy_glsl_syntax(gl_info)) if (!needs_legacy_glsl_syntax(gl_info))
shader_addline(buffer, "out vec4 ps_out[1];\n"); shader_addline(buffer, "out vec4 ps_out[1];\n");
shader_addline(buffer, fshader_header); shader_addline(buffer, fshader_header);
shader_addline(buffer, " %s[0] = texture%s(sampler, out_texcoord.%s);\n", string = string_buffer_get(&blitter->string_buffers);
get_fragment_output(gl_info), needs_legacy_glsl_syntax(gl_info) ? tex_type : "", swizzle); string_buffer_sprintf(string, "%s[0]", get_fragment_output(gl_info));
shader_addline(buffer, " %s = texture%s(sampler, out_texcoord.%s);\n",
string->buffer, needs_legacy_glsl_syntax(gl_info) ? tex_type : "", swizzle);
shader_glsl_color_correction_ext(buffer, string->buffer, WINED3DSP_WRITEMASK_ALL, args->fixup);
string_buffer_release(&blitter->string_buffers, string);
shader_addline(buffer, "}\n"); shader_addline(buffer, "}\n");
ptr = buffer->buffer; ptr = buffer->buffer;
...@@ -12436,9 +12441,9 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi ...@@ -12436,9 +12441,9 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi
return FALSE; return FALSE;
} }
if (!is_identity_fixup(src_format->color_fixup)) if (is_complex_fixup(src_format->color_fixup))
{ {
TRACE("Source fixups are not supported.\n"); TRACE("Complex source fixups are not supported.\n");
return FALSE; return FALSE;
} }
......
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