diff options
author | Thomas Hellstrom <[email protected]> | 2016-09-23 12:57:54 +0200 |
---|---|---|
committer | Thomas Hellstrom <[email protected]> | 2017-02-22 10:17:07 +0100 |
commit | f2872bf8c34bc762a3c1bb2595c8000672659b9f (patch) | |
tree | 95ddef7940cecc40f55fcb3aaf0fee6ebdf633dd /src/gallium/auxiliary/vl | |
parent | 53b45845555f9d4531a915faefe94ee424e60177 (diff) |
gallium/vl: Add sampler views to video filter fragment shaders
Needed for at least the svga driver.
Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_bicubic_filter.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_matrix_filter.c | 5 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_median_filter.c | 5 |
3 files changed, 15 insertions, 0 deletions
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); |