Mesa (master): svga: remove old, unused sincos code for SM2.0

Brian Paul brianp at kemper.freedesktop.org
Tue Oct 11 08:56:11 PDT 2011


Module: Mesa
Branch: master
Commit: b875838ec302c4e830e13ebd5fa834fd22830279
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b875838ec302c4e830e13ebd5fa834fd22830279

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct 11 09:39:28 2011 -0600

svga: remove old, unused sincos code for SM2.0

---

 src/gallium/drivers/svga/svga_tgsi_emit.h |    3 --
 src/gallium/drivers/svga/svga_tgsi_insn.c |   48 -----------------------------
 2 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_tgsi_emit.h b/src/gallium/drivers/svga/svga_tgsi_emit.h
index 717a0af..8ff25d6 100644
--- a/src/gallium/drivers/svga/svga_tgsi_emit.h
+++ b/src/gallium/drivers/svga/svga_tgsi_emit.h
@@ -89,9 +89,6 @@ struct svga_shader_emitter
    boolean created_loop_const;
    int loop_const_idx;
 
-   boolean created_sincos_consts;
-   int sincos_consts_idx;
-
    unsigned inverted_texcoords;  /**< bitmask of which texcoords are flipped */
    struct src_register ps_true_texcoord[PIPE_MAX_ATTRIBS];
    struct src_register ps_inverted_texcoord[PIPE_MAX_ATTRIBS];
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 0e8f63d..5a9af89 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -657,33 +657,6 @@ create_loop_const( struct svga_shader_emitter *emit )
 }
 
 static INLINE boolean
-create_sincos_consts( struct svga_shader_emitter *emit )
-{
-   unsigned idx = emit->nr_hw_float_const++;
-
-   if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx,
-                        -1.5500992e-006f,
-                        -2.1701389e-005f,
-                        0.0026041667f,
-                        0.00026041668f ))
-      return FALSE;
-
-   emit->sincos_consts_idx = idx;
-   idx = emit->nr_hw_float_const++;
-
-   if (!emit_def_const( emit, SVGA3D_CONST_TYPE_FLOAT, idx,
-                        -0.020833334f,
-                        -0.12500000f,
-                        1.0f,
-                        0.50000000f ))
-      return FALSE;
-
-   emit->created_sincos_consts = TRUE;
-
-   return TRUE;
-}
-
-static INLINE boolean
 create_arl_consts( struct svga_shader_emitter *emit )
 {
    int i;
@@ -762,18 +735,6 @@ get_loop_const( struct svga_shader_emitter *emit )
                         emit->loop_const_idx );
 }
 
-/* returns a sincos const */
-static INLINE struct src_register
-get_sincos_const( struct svga_shader_emitter *emit,
-                  unsigned index )
-{
-   assert(emit->created_sincos_consts);
-   assert(emit->sincos_consts_idx >= 0);
-   assert(index == 0 || index == 1);
-   return src_register( SVGA3DREG_CONST,
-                        emit->sincos_consts_idx + index );
-}
-
 static INLINE struct src_register
 get_fake_arl_const( struct svga_shader_emitter *emit )
 {
@@ -3071,12 +3032,6 @@ needs_to_create_loop_const( struct svga_shader_emitter *emit )
 }
 
 static INLINE boolean
-needs_to_create_sincos_consts( struct svga_shader_emitter *emit )
-{
-   return FALSE;
-}
-
-static INLINE boolean
 needs_to_create_arl_consts( struct svga_shader_emitter *emit )
 {
    return (emit->num_arl_consts > 0);
@@ -3177,9 +3132,6 @@ static boolean svga_shader_emit_helpers( struct svga_shader_emitter *emit )
    if (needs_to_create_loop_const( emit )) {
       create_loop_const( emit );
    }
-   if (needs_to_create_sincos_consts( emit )) {
-      create_sincos_consts( emit );
-   }
    if (needs_to_create_arl_consts( emit )) {
       create_arl_consts( emit );
    }



More information about the mesa-commit mailing list