From f2872bf8c34bc762a3c1bb2595c8000672659b9f Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Fri, 23 Sep 2016 12:57:54 +0200 Subject: [PATCH] gallium/vl: Add sampler views to video filter fragment shaders MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Needed for at least the svga driver. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Christian König --- src/gallium/auxiliary/vl/vl_bicubic_filter.c | 5 +++++ src/gallium/auxiliary/vl/vl_matrix_filter.c | 5 +++++ src/gallium/auxiliary/vl/vl_median_filter.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c index 570f1538583..ae292084283 100644 --- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c +++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c @@ -174,6 +174,11 @@ create_frag_shader(struct vl_bicubic_filter *filter, unsigned video_width, i_vtex = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTEX, TGSI_INTERPOLATE_LINEAR); sampler = ureg_DECL_sampler(shader, 0); + ureg_DECL_sampler_view(shader, 0, TGSI_TEXTURE_2D, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT); for (i = 0; i < 23; ++i) t_array[i] = ureg_DECL_temporary(shader); diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c index e331cb75856..11ec8161f4d 100644 --- a/src/gallium/auxiliary/vl/vl_matrix_filter.c +++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c @@ -95,6 +95,11 @@ create_frag_shader(struct vl_matrix_filter *filter, unsigned num_offsets, i_vtex = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTEX, TGSI_INTERPOLATE_LINEAR); sampler = ureg_DECL_sampler(shader, 0); + ureg_DECL_sampler_view(shader, 0, TGSI_TEXTURE_2D, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT); for (i = 0; i < num_offsets; ++i) if (matrix_values[i] != 0.0f) diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index f7477b75739..0183b875871 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -107,6 +107,11 @@ create_frag_shader(struct vl_median_filter *filter, i_vtex = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTEX, TGSI_INTERPOLATE_LINEAR); sampler = ureg_DECL_sampler(shader, 0); + ureg_DECL_sampler_view(shader, 0, TGSI_TEXTURE_2D, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT, + TGSI_RETURN_TYPE_FLOAT); for (i = 0; i < num_offsets; ++i) t_array[i] = ureg_DECL_temporary(shader); -- 2.30.2