[Mesa-dev] [PATCH] gallium/vl: remove unused vertex shader inputs

Marek Olšák maraeo at gmail.com
Fri Jul 15 13:32:57 PDT 2011


Christian,

I have also noticed create_ref_vert_shader doesn't write the vertex
position, which might lead to undefined rendering.
---
 src/gallium/auxiliary/vl/vl_idct.c |    3 +--
 src/gallium/auxiliary/vl/vl_mc.c   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index 645d06a..ad78614 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -143,7 +143,7 @@ static void *
 create_mismatch_vert_shader(struct vl_idct *idct)
 {
    struct ureg_program *shader;
-   struct ureg_src vrect, vpos;
+   struct ureg_src vpos;
    struct ureg_src scale;
    struct ureg_dst t_tex;
    struct ureg_dst o_vpos, o_addr[2];
@@ -152,7 +152,6 @@ create_mismatch_vert_shader(struct vl_idct *idct)
    if (!shader)
       return NULL;
 
-   vrect = ureg_DECL_vs_input(shader, VS_I_RECT);
    vpos = ureg_DECL_vs_input(shader, VS_I_VPOS);
 
    t_tex = ureg_DECL_temporary(shader);
diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c
index bd05205..2606abf 100644
--- a/src/gallium/auxiliary/vl/vl_mc.c
+++ b/src/gallium/auxiliary/vl/vl_mc.c
@@ -103,7 +103,7 @@ create_ref_vert_shader(struct vl_mc *r)
 {
    struct ureg_program *shader;
    struct ureg_src mv_scale;
-   struct ureg_src vrect, vmv[2];
+   struct ureg_src vmv[2];
    struct ureg_dst t_vpos;
    struct ureg_dst o_vpos, o_vmv[2];
    unsigned i;
@@ -112,7 +112,6 @@ create_ref_vert_shader(struct vl_mc *r)
    if (!shader)
       return NULL;
 
-   vrect = ureg_DECL_vs_input(shader, VS_I_RECT);
    vmv[0] = ureg_DECL_vs_input(shader, VS_I_MV_TOP);
    vmv[1] = ureg_DECL_vs_input(shader, VS_I_MV_BOTTOM);
 
-- 
1.7.4.1



More information about the mesa-dev mailing list