[Mesa-dev] [PATCH 2/5] meta/blit: Write depth only when asked for
Matt Turner
mattst88 at gmail.com
Thu Jan 29 10:27:15 PST 2015
On Thu, Jan 29, 2015 at 6:21 AM, Topi Pohjolainen
<topi.pohjolainen at intel.com> wrote:
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index ec7564a..45035b1 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -293,13 +293,14 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
> "void main()\n"
> "{\n"
> " gl_FragColor = %s(texSampler, %s);\n"
> - " gl_FragDepth = gl_FragColor.x;\n"
> + "%s"
> "}\n",
> fs_preprocess, shader->type, fs_input,
> - shader->func, shader->texcoords);
> + shader->func, shader->texcoords,
> + do_depth ? " gl_FragDepth = gl_FragColor.x;\n" : "");
>
> _mesa_meta_compile_and_link_program(ctx, vs_source, fs_source,
> - ralloc_asprintf(mem_ctx, "%s blit",
> + ralloc_asprintf(mem_ctx,"%s blit",
Unintended change.
More information about the mesa-dev
mailing list