aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_state_setup.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-02-21 08:29:56 -0700
committerBrian Paul <[email protected]>2013-02-22 16:49:05 -0700
commitb804fb8714f82c614ee72990d35fe878054b31f3 (patch)
tree83764270844bb5e8c7dc138a707b5ad0b66931e7 /src/gallium/drivers/llvmpipe/lp_state_setup.c
parentf93c5800637fd0967d53a4bc2b652d5f93d17d5d (diff)
llvmpipe: rename polygon offset fields to something more specific
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_setup.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_setup.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_setup.c b/src/gallium/drivers/llvmpipe/lp_state_setup.c
index f44eed49fba..edd5d0fb5e7 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_setup.c
@@ -288,12 +288,15 @@ lp_do_offset_tri(struct gallivm_state *gallivm,
dzdx = LLVMBuildExtractElement(b, dzdxdzdy, zeroi, "");
dzdy = LLVMBuildExtractElement(b, dzdxdzdy, onei, "");
- /* zoffset = offset->units + MAX2(dzdx, dzdy) * offset->scale */
+ /* zoffset = pgon_offset_units + MAX2(dzdx, dzdy) * pgon_offset_scale */
max = LLVMBuildFCmp(b, LLVMRealUGT, dzdx, dzdy, "");
max_value = LLVMBuildSelect(b, max, dzdx, dzdy, "max");
- mult = LLVMBuildFMul(b, max_value, lp_build_const_float(gallivm, key->scale), "");
- zoffset = LLVMBuildFAdd(b, lp_build_const_float(gallivm, key->units), mult, "zoffset");
+ mult = LLVMBuildFMul(b, max_value,
+ lp_build_const_float(gallivm, key->pgon_offset_scale), "");
+ zoffset = LLVMBuildFAdd(b,
+ lp_build_const_float(gallivm, key->pgon_offset_units),
+ mult, "zoffset");
/* yuck */
shuffles[0] = twoi;
@@ -639,7 +642,7 @@ init_args(struct gallivm_state *gallivm,
ooa = vec4f_from_scalar(gallivm, ooa, "");
/* tri offset calc shares a lot of arithmetic, do it here */
- if (key->scale != 0.0f || key->units != 0.0f) {
+ if (key->pgon_offset_scale != 0.0f || key->pgon_offset_units != 0.0f) {
lp_do_offset_tri(gallivm, args, key, ooa, dxy01, dxy20, attr_pos);
}
@@ -818,8 +821,8 @@ lp_make_setup_variant_key(struct llvmpipe_context *lp,
assert(key->spec_slot == lp->color_slot [1]);
assert(key->bspec_slot == lp->bcolor_slot[1]);
- key->units = (float) (lp->rasterizer->offset_units * lp->mrd);
- key->scale = lp->rasterizer->offset_scale;
+ key->pgon_offset_units = (float) (lp->rasterizer->offset_units * lp->mrd);
+ key->pgon_offset_scale = lp->rasterizer->offset_scale;
key->pad = 0;
memcpy(key->inputs, fs->inputs, key->num_inputs * sizeof key->inputs[0]);
for (i = 0; i < key->num_inputs; i++) {