*/
static void
lp_build_sample_texel_soa(struct lp_build_sample_context *bld,
- unsigned sampler_unit,
LLVMValueRef width,
LLVMValueRef height,
LLVMValueRef depth,
*/
static void
lp_build_sample_image_nearest(struct lp_build_sample_context *bld,
- unsigned sampler_unit,
LLVMValueRef size,
LLVMValueRef row_stride_vec,
LLVMValueRef img_stride_vec,
/*
* Get texture colors.
*/
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x, y, z,
row_stride_vec, img_stride_vec,
*/
static void
lp_build_sample_image_linear(struct lp_build_sample_context *bld,
- unsigned sampler_unit,
LLVMValueRef size,
LLVMValueRef linear_mask,
LLVMValueRef row_stride_vec,
* Get texture colors.
*/
/* get x0/x1 texels */
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x0, y0, z0,
row_stride_vec, img_stride_vec,
data_ptr, mipoffsets, neighbors[0][0]);
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x1, y0, z0,
row_stride_vec, img_stride_vec,
LLVMValueRef colors0[4];
/* get x0/x1 texels at y1 */
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x0, y1, z0,
row_stride_vec, img_stride_vec,
data_ptr, mipoffsets, neighbors[1][0]);
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x1, y1, z0,
row_stride_vec, img_stride_vec,
LLVMValueRef colors1[4];
/* get x0/x1/y0/y1 texels at z1 */
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x0, y0, z1,
row_stride_vec, img_stride_vec,
data_ptr, mipoffsets, neighbors1[0][0]);
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x1, y0, z1,
row_stride_vec, img_stride_vec,
data_ptr, mipoffsets, neighbors1[0][1]);
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x0, y1, z1,
row_stride_vec, img_stride_vec,
data_ptr, mipoffsets, neighbors1[1][0]);
- lp_build_sample_texel_soa(bld, sampler_unit,
+ lp_build_sample_texel_soa(bld,
width_vec, height_vec, depth_vec,
x1, y1, z1,
row_stride_vec, img_stride_vec,
*/
static void
lp_build_sample_mipmap(struct lp_build_sample_context *bld,
- unsigned sampler_unit,
unsigned img_filter,
unsigned mip_filter,
LLVMValueRef *coords,
mipoff0 = lp_build_get_mip_offsets(bld, ilevel0);
}
if (img_filter == PIPE_TEX_FILTER_NEAREST) {
- lp_build_sample_image_nearest(bld, sampler_unit,
- size0,
+ lp_build_sample_image_nearest(bld, size0,
row_stride0_vec, img_stride0_vec,
data_ptr0, mipoff0, coords, offsets,
colors0);
}
else {
assert(img_filter == PIPE_TEX_FILTER_LINEAR);
- lp_build_sample_image_linear(bld, sampler_unit,
- size0, NULL,
+ lp_build_sample_image_linear(bld, size0, NULL,
row_stride0_vec, img_stride0_vec,
data_ptr0, mipoff0, coords, offsets,
colors0);
mipoff1 = lp_build_get_mip_offsets(bld, ilevel1);
}
if (img_filter == PIPE_TEX_FILTER_NEAREST) {
- lp_build_sample_image_nearest(bld, sampler_unit,
- size1,
+ lp_build_sample_image_nearest(bld, size1,
row_stride1_vec, img_stride1_vec,
data_ptr1, mipoff1, coords, offsets,
colors1);
}
else {
- lp_build_sample_image_linear(bld, sampler_unit,
- size1, NULL,
+ lp_build_sample_image_linear(bld, size1, NULL,
row_stride1_vec, img_stride1_vec,
data_ptr1, mipoff1, coords, offsets,
colors1);
*/
static void
lp_build_sample_mipmap_both(struct lp_build_sample_context *bld,
- unsigned sampler_unit,
LLVMValueRef linear_mask,
unsigned mip_filter,
LLVMValueRef *coords,
mipoff0 = lp_build_get_mip_offsets(bld, ilevel0);
}
- lp_build_sample_image_linear(bld, sampler_unit,
- size0, linear_mask,
+ lp_build_sample_image_linear(bld, size0, linear_mask,
row_stride0_vec, img_stride0_vec,
data_ptr0, mipoff0, coords, offsets,
colors0);
mipoff1 = lp_build_get_mip_offsets(bld, ilevel1);
}
- lp_build_sample_image_linear(bld, sampler_unit,
- size1, linear_mask,
+ lp_build_sample_image_linear(bld, size1, linear_mask,
row_stride1_vec, img_stride1_vec,
data_ptr1, mipoff1, coords, offsets,
colors1);
if (min_filter == mag_filter) {
/* no need to distinguish between minification and magnification */
- lp_build_sample_mipmap(bld, sampler_unit,
- min_filter, mip_filter,
+ lp_build_sample_mipmap(bld, min_filter, mip_filter,
coords, offsets,
ilevel0, ilevel1, lod_fpart,
texels);
lp_build_if(&if_ctx, bld->gallivm, lod_positive);
{
/* Use the minification filter */
- lp_build_sample_mipmap(bld, sampler_unit,
- min_filter, mip_filter,
+ lp_build_sample_mipmap(bld, min_filter, mip_filter,
coords, offsets,
ilevel0, ilevel1, lod_fpart,
texels);
lp_build_else(&if_ctx);
{
/* Use the magnification filter */
- lp_build_sample_mipmap(bld, sampler_unit,
- mag_filter, PIPE_TEX_MIPFILTER_NONE,
+ lp_build_sample_mipmap(bld, mag_filter, PIPE_TEX_MIPFILTER_NONE,
coords, offsets,
ilevel0, NULL, NULL,
texels);
* aren't all that complicated so just always run a combined path
* if at least some pixels require linear.
*/
- lp_build_sample_mipmap_both(bld, sampler_unit,
- linear_mask, mip_filter,
+ lp_build_sample_mipmap_both(bld, linear_mask, mip_filter,
coords, offsets,
ilevel0, ilevel1,
lod_fpart, lod_positive,
* All pixels require just nearest filtering, which is way
* cheaper than linear, hence do a separate path for that.
*/
- lp_build_sample_mipmap(bld, sampler_unit,
- PIPE_TEX_FILTER_NEAREST, mip_filter_for_nearest,
+ lp_build_sample_mipmap(bld, PIPE_TEX_FILTER_NEAREST,
+ mip_filter_for_nearest,
coords, offsets,
ilevel0, ilevel1, lod_fpart,
texels);