summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_llvm.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-09-29 10:34:41 -0600
committerBrian Paul <brianp@vmware.com>2010-09-29 10:34:43 -0600
commit0cb545a7f2e823c85309013c4c41e9461f297d06 (patch)
tree142c37797a7a1384033941bd12e4488b05f86faa /src/gallium/auxiliary/draw/draw_llvm.c
parent698893889a1c6e2a75af68ee6e860bce05aa8127 (diff)
draw: pass sampler state down to llvm jit state
Fixes a regression caused from the change to make min/max lod dynamic state. https://bugs.freedesktop.org/show_bug.cgi?id=30437
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 5154c1f3c5..4749bb57a5 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -44,6 +44,7 @@
#include "tgsi/tgsi_dump.h"
#include "util/u_cpu_detect.h"
+#include "util/u_math.h"
#include "util/u_pointer.h"
#include "util/u_string.h"
@@ -1089,6 +1090,23 @@ draw_llvm_set_mapped_texture(struct draw_context *draw,
}
}
+
+void
+draw_llvm_set_sampler_state(struct draw_context *draw)
+{
+ unsigned i;
+
+ for (i = 0; i < draw->num_samplers; i++) {
+ struct draw_jit_texture *jit_tex = &draw->llvm->jit_context.textures[i];
+
+ jit_tex->min_lod = draw->samplers[i]->min_lod;
+ jit_tex->max_lod = draw->samplers[i]->max_lod;
+ jit_tex->lod_bias = draw->samplers[i]->lod_bias;
+ COPY_4V(jit_tex->border_color, draw->samplers[i]->border_color);
+ }
+}
+
+
void
draw_llvm_destroy_variant(struct draw_llvm_variant *variant)
{