summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-10-08 18:24:54 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-10-08 19:11:52 +0100
commitf5b5fb32d3a9eb8667f91907bcf065fe8bd4988d (patch)
tree52f0022851e8a52778bcb55e3a9db7dfe2d64a9f /src/gallium/auxiliary/gallivm/lp_bld_sample.h
parent5b24d69fcd6359dc959ec465c7e77b4626a27e72 (diff)
gallivm: Move into the as much of the second level code as possible.
Also, pass more stuff trhough the sample build context, instead of arguments.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample.h')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
index e5d7f10778..44c8fc5764 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
@@ -179,6 +179,9 @@ struct lp_build_sample_context
const struct util_format_description *format_desc;
+ /* See texture_dims() */
+ unsigned dims;
+
/** regular scalar float type */
struct lp_type float_type;
struct lp_build_context float_bld;
@@ -214,8 +217,21 @@ struct lp_build_sample_context
struct lp_type texel_type;
struct lp_build_context texel_bld;
+ /* Common dynamic state values */
+ LLVMValueRef width;
+ LLVMValueRef height;
+ LLVMValueRef depth;
+ LLVMValueRef row_stride_array;
+ LLVMValueRef img_stride_array;
+ LLVMValueRef data_array;
+
/** Unsigned vector with texture width, height, depth */
LLVMValueRef uint_size;
+
+ /* width, height, depth as uint vectors */
+ LLVMValueRef width_vec;
+ LLVMValueRef height_vec;
+ LLVMValueRef depth_vec;
};
@@ -292,9 +308,6 @@ lp_build_lod_selector(struct lp_build_sample_context *bld,
const LLVMValueRef ddy[4],
LLVMValueRef lod_bias, /* optional */
LLVMValueRef explicit_lod, /* optional */
- LLVMValueRef width,
- LLVMValueRef height,
- LLVMValueRef depth,
unsigned mip_filter,
LLVMValueRef *out_lod_ipart,
LLVMValueRef *out_lod_fpart);
@@ -315,22 +328,16 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
LLVMValueRef
lp_build_get_mipmap_level(struct lp_build_sample_context *bld,
- LLVMValueRef data_array, LLVMValueRef level);
+ LLVMValueRef level);
LLVMValueRef
lp_build_get_const_mipmap_level(struct lp_build_sample_context *bld,
- LLVMValueRef data_array, int level);
+ int level);
void
lp_build_mipmap_level_sizes(struct lp_build_sample_context *bld,
- unsigned dims,
- LLVMValueRef width_vec,
- LLVMValueRef height_vec,
- LLVMValueRef depth_vec,
LLVMValueRef ilevel,
- LLVMValueRef row_stride_array,
- LLVMValueRef img_stride_array,
LLVMValueRef *out_width_vec,
LLVMValueRef *out_height_vec,
LLVMValueRef *out_depth_vec,