summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-05-04 13:31:50 +0100
committerJosé Fonseca <[email protected]>2010-05-04 13:32:40 +0100
commit4554cdc289f1d97855825127c0bf8c0e7f6a2eda (patch)
treea5954d9e96dde8011470873b67e26eaa6387a31a /src/gallium/auxiliary
parent2b1f0e17d8c2f9c6191b42770eaab487859a8456 (diff)
gallivm: Fix several glitches introduced in the prev commit.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c4
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi.h3
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c6
3 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 59279232717..d1592c22f43 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -954,12 +954,12 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
dsdy = LLVMBuildExtractElement(bld->builder, ddy[0], index0, "dsdy");
dsdy = lp_build_abs(float_bld, dsdy);
if (dims > 1) {
- dtdx = LLVMBuildExtractElement(bld->builder, ddx[1], index0, "dsdx");
+ dtdx = LLVMBuildExtractElement(bld->builder, ddx[1], index0, "dtdx");
dtdx = lp_build_abs(float_bld, dtdx);
dtdy = LLVMBuildExtractElement(bld->builder, ddy[1], index0, "dtdy");
dtdy = lp_build_abs(float_bld, dtdy);
if (dims > 2) {
- drdx = LLVMBuildExtractElement(bld->builder, ddx[2], index0, "dsdx");
+ drdx = LLVMBuildExtractElement(bld->builder, ddx[2], index0, "drdx");
drdx = lp_build_abs(float_bld, drdx);
drdy = LLVMBuildExtractElement(bld->builder, ddy[2], index0, "drdy");
drdy = lp_build_abs(float_bld, drdy);
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
index 4ca730a98a0..71c51db7869 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h
@@ -45,9 +45,6 @@ struct lp_build_context;
struct lp_build_mask_context;
-#define LP_BLD_SAMPLER_EXPLICIT_DERIVATIVES 1
-
-
/**
* Sampler code generation interface.
*
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
index 6659cff8706..022223bb296 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c
@@ -644,7 +644,7 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
}
/* FIXME: Treat TEX_MODIFIER_EXPLICIT_LOD correctly */
- if (modifier == TEX_MODIFIER_LOD_BIAS || TEX_MODIFIER_EXPLICIT_LOD)
+ if (modifier == TEX_MODIFIER_LOD_BIAS || modifier == TEX_MODIFIER_EXPLICIT_LOD)
lodbias = emit_fetch( bld, inst, 0, 3 );
else
lodbias = bld->base.zero;
@@ -676,6 +676,10 @@ emit_tex( struct lp_build_tgsi_soa_context *bld,
}
unit = inst->Src[1].Register.Index;
}
+ for (i = num_coords; i < 3; i++) {
+ ddx[i] = bld->base.undef;
+ ddy[i] = bld->base.undef;
+ }
bld->sampler->emit_fetch_texel(bld->sampler,
bld->base.builder,