diff options
author | Topi Pohjolainen <[email protected]> | 2014-04-18 02:21:13 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2014-05-12 17:48:45 +0300 |
commit | ac4db0aa559ac07262d977f35915953f97875333 (patch) | |
tree | 746919c709ebfa34e9bcbe5107878ff0c22043e6 /src/mesa/drivers/common/meta_blit.c | |
parent | 3a43cd0c3e611085347f67976a619b915dff07b7 (diff) |
meta: Merge compiling and linking of blit program
Cc: "10.2" <[email protected]>
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta_blit.c')
-rw-r--r-- | src/mesa/drivers/common/meta_blit.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index c3dc146147c..14ecf8f11ed 100644 --- a/src/mesa/drivers/common/meta_blit.c +++ b/src/mesa/drivers/common/meta_blit.c @@ -62,7 +62,6 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, { const char *vs_source; char *fs_source; - GLuint vs, fs; void *mem_ctx; enum blit_msaa_shader shader_index; bool dst_is_msaa = false; @@ -314,21 +313,10 @@ setup_glsl_msaa_blit_shader(struct gl_context *ctx, sample_resolve); } - vs = _mesa_meta_compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_source); - fs = _mesa_meta_compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_source); - - blit->msaa_shaders[shader_index] = _mesa_CreateProgram(); - _mesa_AttachShader(blit->msaa_shaders[shader_index], fs); - _mesa_DeleteShader(fs); - _mesa_AttachShader(blit->msaa_shaders[shader_index], vs); - _mesa_DeleteShader(vs); - _mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 0, "position"); - _mesa_BindAttribLocation(blit->msaa_shaders[shader_index], 1, "texcoords"); - _mesa_meta_link_program_with_debug(ctx, blit->msaa_shaders[shader_index]); - _mesa_ObjectLabel(GL_PROGRAM, blit->msaa_shaders[shader_index], -1, name); - ralloc_free(mem_ctx); + _mesa_meta_compile_and_link_program(ctx, vs_source, fs_source, name, + &blit->msaa_shaders[shader_index]); - _mesa_UseProgram(blit->msaa_shaders[shader_index]); + ralloc_free(mem_ctx); } static void |