summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2015-01-28 16:24:25 +0200
committerTopi Pohjolainen <[email protected]>2015-01-30 09:54:53 +0200
commit4c157d34c0163ab2389d74181121950aaf0ef121 (patch)
tree2a41659dddda23e150bb343ab2743ae869a402ac /src/mesa/drivers/common
parent604ae33c8b95a97ba586780324566fd21c59b695 (diff)
meta/blit: Add plumbing for shaders without depth
Currently all blit programs are unconditionally compiled with gl_FragDepth. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta.c3
-rw-r--r--src/mesa/drivers/common/meta.h1
-rw-r--r--src/mesa/drivers/common/meta_blit.c2
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 23c05ebdaff..ec7564ab7c4 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -243,6 +243,7 @@ _mesa_meta_compile_and_link_program(struct gl_context *ctx,
void
_mesa_meta_setup_blit_shader(struct gl_context *ctx,
GLenum target,
+ bool do_depth,
struct blit_shader_table *table)
{
char *vs_source, *fs_source;
@@ -3035,7 +3036,7 @@ decompress_texture_image(struct gl_context *ctx,
_mesa_meta_setup_vertex_objects(&decompress->VAO, &decompress->VBO, true,
2, 4, 0);
- _mesa_meta_setup_blit_shader(ctx, target, &decompress->shaders);
+ _mesa_meta_setup_blit_shader(ctx, target, true, &decompress->shaders);
} else {
_mesa_meta_setup_ff_tnl_for_blit(&decompress->VAO, &decompress->VBO, 3);
}
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index 20d30f7e6ab..de3dc6a0ab4 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -632,6 +632,7 @@ _mesa_meta_setup_copypix_texture(struct gl_context *ctx,
void
_mesa_meta_setup_blit_shader(struct gl_context *ctx,
GLenum target,
+ bool do_depth,
struct blit_shader_table *table);
void
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 079b8e13200..02e90e0aaf7 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -531,7 +531,7 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx,
} else if (is_target_multisample) {
setup_glsl_msaa_blit_shader(ctx, blit, src_rb, target);
} else {
- _mesa_meta_setup_blit_shader(ctx, target, &blit->shaders);
+ _mesa_meta_setup_blit_shader(ctx, target, true, &blit->shaders);
}
}
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index eedbb8eb2f4..c38b46bb688 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -193,7 +193,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
if (use_glsl_version) {
_mesa_meta_setup_vertex_objects(&mipmap->VAO, &mipmap->VBO, true,
2, 4, 0);
- _mesa_meta_setup_blit_shader(ctx, target, &mipmap->shaders);
+ _mesa_meta_setup_blit_shader(ctx, target, true, &mipmap->shaders);
} else {
_mesa_meta_setup_ff_tnl_for_blit(&mipmap->VAO, &mipmap->VBO, 3);
_mesa_set_enable(ctx, target, GL_TRUE);