gallivm: Cleanup the TGSI <-> sampler interface.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 3 Sep 2010 09:54:41 +0000 (10:54 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 11 Sep 2010 12:27:27 +0000 (13:27 +0100)
src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c

index bc9140852ff39c74323d6618e9969514ace476e7..2a05cbc3e2c93e480ce8c32d1c73a30685103001 100644 (file)
@@ -84,13 +84,9 @@ struct lp_build_sampler_soa
 
 struct lp_build_sampler_aos
 {
-   void
-   (*destroy)( struct lp_build_sampler_aos *sampler );
-
    LLVMValueRef
-   (*emit_fetch_texel)( const struct lp_build_sampler_aos *sampler,
-                        LLVMBuilderRef builder,
-                        struct lp_type type,
+   (*emit_fetch_texel)( struct lp_build_sampler_aos *sampler,
+                        struct lp_build_context *bld,
                         unsigned target, /* TGSI_TEXTURE_* */
                         unsigned unit,
                         LLVMValueRef coords,
index 2793a1a39760ccd736b78403401b3604bf6e0954..6bf510cbefdb87c15c8cc529e1582d895e217b45 100644 (file)
@@ -74,7 +74,7 @@ struct lp_build_tgsi_aos_context
    const LLVMValueRef *inputs;
    LLVMValueRef *outputs;
 
-   const struct lp_build_sampler_aos *sampler;
+   struct lp_build_sampler_aos *sampler;
 
    LLVMValueRef immediates[LP_MAX_TGSI_IMMEDIATES];
    LLVMValueRef temps[LP_MAX_TGSI_TEMPS];
@@ -398,8 +398,7 @@ emit_tex(struct lp_build_tgsi_aos_context *bld,
    }
 
    return bld->sampler->emit_fetch_texel(bld->sampler,
-                                         bld->base.builder,
-                                         bld->base.type,
+                                         &bld->base,
                                          target, unit,
                                          coords, ddx, ddy,
                                          modifier);