llvmpipe: doc fixes
Reviewed-by: Jose Fonseca <jose.fonseca@broadcom.com> Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37986>
This commit is contained in:
@@ -1132,8 +1132,9 @@ lp_build_div(struct lp_build_context *bld,
|
||||
/**
|
||||
* Linear interpolation helper.
|
||||
*
|
||||
* @param normalized whether we are interpolating normalized values,
|
||||
* encoded in normalized integers, twice as wide.
|
||||
* @param flags
|
||||
* LP_BLD_LERP_WIDE_NORMALIZED: whether we are interpolating normalized
|
||||
* values, encoded in normalized integers, twice as wide.
|
||||
*
|
||||
* @sa http://www.stereopsis.com/doubleblend.html
|
||||
*/
|
||||
@@ -1191,9 +1192,9 @@ lp_build_lerp_simple(struct lp_build_context *bld,
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* The rescaling trick above doesn't work for signed numbers, so
|
||||
* use the 2**n - 1 divison approximation in lp_build_mul_norm
|
||||
* instead.
|
||||
* Scale x from [0, 2**n - 1] to [0, 2**n] by adding the
|
||||
* most-significant-bit to the lowest-significant-bit, so that
|
||||
* later we can just divide by 2**n instead of 2**n - 1.
|
||||
*/
|
||||
assert(!(flags & LP_BLD_LERP_PRESCALED_WEIGHTS));
|
||||
res = lp_build_mul_norm(bld->gallivm, bld->type, x, delta);
|
||||
@@ -1228,8 +1229,8 @@ lp_build_lerp_simple(struct lp_build_context *bld,
|
||||
/*
|
||||
* We need to mask out the high order bits when lerping 8bit
|
||||
* normalized colors stored on 16bits
|
||||
*/
|
||||
/* XXX: This step is necessary for lerping 8bit colors stored on
|
||||
*
|
||||
* XXX: This step is necessary for lerping 8bit colors stored on
|
||||
* 16bits, but it will be wrong for true fixed point use cases.
|
||||
* Basically we need a more powerful lp_type, capable of further
|
||||
* distinguishing the values interpretation from the value storage.
|
||||
|
||||
@@ -546,7 +546,7 @@ lp_build_sample_image_nearest(struct lp_build_sample_context *bld,
|
||||
|
||||
/**
|
||||
* Fetch texels for image with linear sampling.
|
||||
* Return filtered color as two vectors of 16-bit fixed point values.
|
||||
* Return filtered color as one vectors of 8-bit unorm values.
|
||||
*/
|
||||
static void
|
||||
lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
@@ -581,7 +581,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
*
|
||||
* where each value is between 0 and 0xff,
|
||||
*
|
||||
* into one 16 x i20
|
||||
* into one 16 x i8
|
||||
*
|
||||
* s_fpart = {s0, s0, s0, s0, s1, s1, s1, s1, s2, s2, s2, s2, s3, s3, s3, s3}
|
||||
*
|
||||
@@ -628,13 +628,6 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
* bit cast them into 16 x u8
|
||||
*
|
||||
* r0 g0 b0 a0 r1 g1 b1 a1 r2 g2 b2 a2 r3 g3 b3 a3
|
||||
*
|
||||
* unpack them into two 8 x i16:
|
||||
*
|
||||
* r0 g0 b0 a0 r1 g1 b1 a1
|
||||
* r2 g2 b2 a2 r3 g3 b3 a3
|
||||
*
|
||||
* The higher 8 bits of the resulting elements will be zero.
|
||||
*/
|
||||
numj = 1 + (dims >= 2);
|
||||
numk = 1 + (dims >= 3);
|
||||
@@ -677,7 +670,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
}
|
||||
|
||||
/*
|
||||
* Linear interpolation with 8.8 fixed point.
|
||||
* Linear interpolation with 8-bit unorm.
|
||||
*/
|
||||
|
||||
/* general 1/2/3-D lerping */
|
||||
@@ -726,7 +719,7 @@ lp_build_sample_fetch_image_linear(struct lp_build_sample_context *bld,
|
||||
|
||||
/**
|
||||
* Sample a single texture image with (bi-)(tri-)linear sampling.
|
||||
* Return filtered color as two vectors of 16-bit fixed point values.
|
||||
* Return filtered color as a vector of 8-bit unorm values.
|
||||
*/
|
||||
static void
|
||||
lp_build_sample_image_linear(struct lp_build_sample_context *bld,
|
||||
|
||||
@@ -3641,7 +3641,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
||||
(bld.num_lods == 1 ||
|
||||
derived_sampler_state.min_img_filter == derived_sampler_state.mag_img_filter))) {
|
||||
if (use_aos) {
|
||||
/* do sampling/filtering with fixed pt arithmetic */
|
||||
/* do sampling/filtering with 8-bit unorm arithmetic */
|
||||
lp_build_sample_aos(&bld,
|
||||
newcoords[0], newcoords[1],
|
||||
newcoords[2],
|
||||
@@ -3792,7 +3792,7 @@ lp_build_sample_soa_code(struct gallivm_state *gallivm,
|
||||
}
|
||||
|
||||
if (use_aos) {
|
||||
/* do sampling/filtering with fixed pt arithmetic */
|
||||
/* do sampling/filtering with 8-bit arithmetic */
|
||||
lp_build_sample_aos(&bld4,
|
||||
s4, t4, r4, offsets4,
|
||||
lod_positive4, lod_fpart4,
|
||||
|
||||
Reference in New Issue
Block a user