[Mesa-dev] [PATCH 3/5] gallivm: add uint/int bld to the base builder.

Dave Airlie airlied at gmail.com
Mon Feb 6 07:46:42 PST 2012


From: Dave Airlie <airlied at redhat.com>

These are used inside the action handlers for the integer opcodes.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/auxiliary/gallivm/lp_bld_tgsi.h     |    3 +++
 src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c |    2 ++
 src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c |    2 ++
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
index b03eefc..a320d94 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
@@ -279,6 +279,9 @@ struct lp_build_tgsi_context
 {
    struct lp_build_context base;
 
+   struct lp_build_context uintbld;
+   struct lp_build_context intbld;
+
    /** This array stores functions that are used to transform TGSI opcodes to
      * LLVM instructions.
      */
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
index 53013f7..0f98fa8 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c
@@ -991,6 +991,8 @@ lp_build_tgsi_aos(struct gallivm_state *gallivm,
    /* Setup build context */
    memset(&bld, 0, sizeof bld);
    lp_build_context_init(&bld.bld_base.base, gallivm, type);
+   lp_build_context_init(&bld.bld_base.uintbld, gallivm, lp_int_type(type));
+   lp_build_context_init(&bld.bld_base.intbld, gallivm, lp_uint_type(type));
    lp_build_context_init(&bld.int_bld, gallivm, lp_int_type(type));
 
    for (chan = 0; chan < 4; ++chan) {
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index eb5176a..45b0980 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -1758,6 +1758,8 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm,
    /* Setup build context */
    memset(&bld, 0, sizeof bld);
    lp_build_context_init(&bld.bld_base.base, gallivm, type);
+   lp_build_context_init(&bld.bld_base.uintbld, gallivm, lp_int_type(type));
+   lp_build_context_init(&bld.bld_base.intbld, gallivm, lp_uint_type(type));
    lp_build_context_init(&bld.uint_bld, gallivm, lp_uint_type(type));
    lp_build_context_init(&bld.elem_bld, gallivm, lp_elem_type(type));
    bld.mask = mask;
-- 
1.7.7.6



More information about the mesa-dev mailing list