gallivm/llvmpipe: add const qualifiers
authorBrian Paul <brianp@vmware.com>
Wed, 12 May 2010 16:20:03 +0000 (10:20 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 12 May 2010 16:38:00 +0000 (10:38 -0600)
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
src/gallium/drivers/llvmpipe/lp_tex_sample.c

index 955b1d21ee5ead71fce1d0be5e2a3a25ac9c5344..1941262d7828ca041f74610bad9f52b78c45dc4a 100644 (file)
@@ -97,40 +97,40 @@ struct lp_sampler_dynamic_state
 
    /** Obtain the base texture width. */
    LLVMValueRef
-   (*width)( struct lp_sampler_dynamic_state *state,
+   (*width)( const struct lp_sampler_dynamic_state *state,
              LLVMBuilderRef builder,
              unsigned unit);
 
    /** Obtain the base texture height. */
    LLVMValueRef
-   (*height)( struct lp_sampler_dynamic_state *state,
+   (*height)( const struct lp_sampler_dynamic_state *state,
               LLVMBuilderRef builder,
               unsigned unit);
 
    /** Obtain the base texture depth. */
    LLVMValueRef
-   (*depth)( struct lp_sampler_dynamic_state *state,
+   (*depth)( const struct lp_sampler_dynamic_state *state,
              LLVMBuilderRef builder,
              unsigned unit);
 
    /** Obtain the number of mipmap levels (minus one). */
    LLVMValueRef
-   (*last_level)( struct lp_sampler_dynamic_state *state,
+   (*last_level)( const struct lp_sampler_dynamic_state *state,
                   LLVMBuilderRef builder,
                   unsigned unit);
 
    LLVMValueRef
-   (*row_stride)( struct lp_sampler_dynamic_state *state,
+   (*row_stride)( const struct lp_sampler_dynamic_state *state,
                   LLVMBuilderRef builder,
                   unsigned unit);
 
    LLVMValueRef
-   (*img_stride)( struct lp_sampler_dynamic_state *state,
+   (*img_stride)( const struct lp_sampler_dynamic_state *state,
                   LLVMBuilderRef builder,
                   unsigned unit);
 
    LLVMValueRef
-   (*data_ptr)( struct lp_sampler_dynamic_state *state,
+   (*data_ptr)( const struct lp_sampler_dynamic_state *state,
                 LLVMBuilderRef builder,
                 unsigned unit);
 
index 5ce1385c4809081e04943592f43231e13f68129d..4d415b6d4161e0dbc06c11a72c807c1d5add6f1b 100644 (file)
@@ -59,7 +59,7 @@ struct lp_build_sampler_soa
    (*destroy)( struct lp_build_sampler_soa *sampler );
 
    void
-   (*emit_fetch_texel)( struct lp_build_sampler_soa *sampler,
+   (*emit_fetch_texel)( const struct lp_build_sampler_soa *sampler,
                         LLVMBuilderRef builder,
                         struct lp_type type,
                         unsigned unit,
@@ -83,7 +83,7 @@ lp_build_tgsi_soa(LLVMBuilderRef builder,
                   const LLVMValueRef (*inputs)[4],
                   LLVMValueRef (*outputs)[4],
                   struct lp_build_sampler_soa *sampler,
-                  struct tgsi_shader_info *info);
+                  const struct tgsi_shader_info *info);
 
 
 #endif /* LP_BLD_TGSI_H */
index ca2b78fb8ce4651725b6658b54bc0550769fad1e..1622eda5c872b7eee570ec9fcf443e3a1bd85e47 100644 (file)
@@ -120,7 +120,7 @@ struct lp_build_tgsi_soa_context
    const LLVMValueRef (*inputs)[NUM_CHANNELS];
    LLVMValueRef (*outputs)[NUM_CHANNELS];
 
-   struct lp_build_sampler_soa *sampler;
+   const struct lp_build_sampler_soa *sampler;
 
    LLVMValueRef immediates[LP_MAX_TGSI_IMMEDIATES][NUM_CHANNELS];
    LLVMValueRef temps[LP_MAX_TGSI_TEMPS][NUM_CHANNELS];
@@ -1882,7 +1882,7 @@ lp_build_tgsi_soa(LLVMBuilderRef builder,
                   const LLVMValueRef (*inputs)[NUM_CHANNELS],
                   LLVMValueRef (*outputs)[NUM_CHANNELS],
                   struct lp_build_sampler_soa *sampler,
-                  struct tgsi_shader_info *info)
+                  const struct tgsi_shader_info *info)
 {
    struct lp_build_tgsi_soa_context bld;
    struct tgsi_parse_context parse;
index d3a9d39f6167375ead7bdd6cccb86e7353434176..65208dd5d5c9484ab35182185a8300e5862b8c1d 100644 (file)
@@ -87,7 +87,7 @@ struct lp_llvm_sampler_soa
  * @sa http://llvm.org/docs/GetElementPtr.html
  */
 static LLVMValueRef
-lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
+lp_llvm_texture_member(const struct lp_sampler_dynamic_state *base,
                        LLVMBuilderRef builder,
                        unsigned unit,
                        unsigned member_index,
@@ -135,7 +135,7 @@ lp_llvm_texture_member(struct lp_sampler_dynamic_state *base,
  */
 #define LP_LLVM_TEXTURE_MEMBER(_name, _index, _emit_load)  \
    static LLVMValueRef \
-   lp_llvm_texture_##_name( struct lp_sampler_dynamic_state *base, \
+   lp_llvm_texture_##_name( const struct lp_sampler_dynamic_state *base, \
                             LLVMBuilderRef builder, \
                             unsigned unit) \
    { \
@@ -164,7 +164,7 @@ lp_llvm_sampler_soa_destroy(struct lp_build_sampler_soa *sampler)
  * The 'texel' parameter returns four vectors corresponding to R, G, B, A.
  */
 static void
-lp_llvm_sampler_soa_emit_fetch_texel(struct lp_build_sampler_soa *base,
+lp_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base,
                                      LLVMBuilderRef builder,
                                      struct lp_type type,
                                      unsigned unit,