gallium/vl: Add sampler views to video filter fragment shaders
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 23 Sep 2016 10:57:54 +0000 (12:57 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 22 Feb 2017 09:17:07 +0000 (10:17 +0100)
Needed for at least the svga driver.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/auxiliary/vl/vl_bicubic_filter.c
src/gallium/auxiliary/vl/vl_matrix_filter.c
src/gallium/auxiliary/vl/vl_median_filter.c

index 570f153858314a9ea927a6fcff7f0321f4196a93..ae292084283e6e0e1394717e2e448313a6f8bcb3 100644 (file)
@@ -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);
index e331cb75856557fd402ca28eed84bfb4c7639865..11ec8161f4de9207985b59df6de42b60f05203af 100644 (file)
@@ -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)
index f7477b75739e472f3b93608e8ae4f8159ba239eb..0183b8758714f474cd7a74ed813a4e163b0a0e12 100644 (file)
@@ -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);