gallivm: added texture border_color field
authorBrian Paul <brianp@vmware.com>
Thu, 4 Mar 2010 22:52:01 +0000 (15:52 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 4 Mar 2010 22:56:55 +0000 (15:56 -0700)
src/gallium/auxiliary/gallivm/lp_bld_sample.c
src/gallium/auxiliary/gallivm/lp_bld_sample.h

index a133b56ac556e6ff7fd6402db5f63399356483d5..55ac2e94363053ee52a48d32fae3d58bae7ed3d5 100644 (file)
 #include "lp_bld_sample.h"
 
 
+/**
+ * Initialize lp_sampler_static_state object with the gallium sampler
+ * and texture state.
+ * The former is considered to be static and the later dynamic.
+ */
 void
 lp_sampler_static_state(struct lp_sampler_static_state *state,
                         const struct pipe_texture *texture,
@@ -70,6 +75,10 @@ lp_sampler_static_state(struct lp_sampler_static_state *state,
    state->min_mip_filter    = sampler->min_mip_filter;
    state->mag_img_filter    = sampler->mag_img_filter;
    state->compare_mode      = sampler->compare_mode;
+   state->border_color[0]   = sampler->border_color[0];
+   state->border_color[1]   = sampler->border_color[1];
+   state->border_color[2]   = sampler->border_color[2];
+   state->border_color[3]   = sampler->border_color[3];
    if(sampler->compare_mode != PIPE_TEX_COMPARE_NONE) {
       state->compare_func      = sampler->compare_func;
    }
index 39edcf13d149c8a7ca6a7b620aa310aefe9b40de..a791d8861278eccf8dada653c801f176d4637655 100644 (file)
@@ -70,6 +70,7 @@ struct lp_sampler_static_state
    unsigned compare_mode:1;
    unsigned compare_func:3;
    unsigned normalized_coords:1;
+   float border_color[4];
 };