X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fgallivm%2Flp_bld_sample.h;h=8ceb20473d57099988f9c1c86b94fba4dbb8f1c8;hb=c7f5c9a3dc6350252e73b541bb85ab3ed9e64a9c;hp=5ba0925bb691ee5635f65775ddd4d11ae26ef0d8;hpb=7f4b5c5387a3a8e3c5f31f0badc943c43857683a;p=mesa.git diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index 5ba0925bb69..8ceb20473d5 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -36,9 +36,10 @@ #define LP_BLD_SAMPLE_H -#include +#include "gallivm/lp_bld.h" -struct pipe_texture; +struct pipe_resource; +struct pipe_sampler_view; struct pipe_sampler_state; struct util_format_description; struct lp_type; @@ -48,14 +49,20 @@ struct lp_build_context; /** * Sampler static state. * - * These are the bits of state from pipe_texture and pipe_sampler_state that + * These are the bits of state from pipe_resource and pipe_sampler_state that * are embedded in the generated code. */ struct lp_sampler_static_state { - /* pipe_texture's state */ + /* pipe_sampler_view's state */ enum pipe_format format; - unsigned target:2; + unsigned swizzle_r:3; + unsigned swizzle_g:3; + unsigned swizzle_b:3; + unsigned swizzle_a:3; + + /* pipe_texture's state */ + unsigned target:3; unsigned pot_width:1; unsigned pot_height:1; unsigned pot_depth:1; @@ -78,7 +85,7 @@ struct lp_sampler_static_state /** * Sampler dynamic state. * - * These are the bits of state from pipe_texture and pipe_sampler_state that + * These are the bits of state from pipe_resource and pipe_sampler_state that * are computed in runtime. * * There are obtained through callbacks, as we don't want to tie the texture @@ -113,9 +120,14 @@ struct lp_sampler_dynamic_state unsigned unit); LLVMValueRef - (*stride)( struct lp_sampler_dynamic_state *state, - LLVMBuilderRef builder, - unsigned unit); + (*row_stride)( struct lp_sampler_dynamic_state *state, + LLVMBuilderRef builder, + unsigned unit); + + LLVMValueRef + (*img_stride)( struct lp_sampler_dynamic_state *state, + LLVMBuilderRef builder, + unsigned unit); LLVMValueRef (*data_ptr)( struct lp_sampler_dynamic_state *state, @@ -130,7 +142,7 @@ struct lp_sampler_dynamic_state */ void lp_sampler_static_state(struct lp_sampler_static_state *state, - const struct pipe_texture *texture, + const struct pipe_sampler_view *view, const struct pipe_sampler_state *sampler); @@ -148,8 +160,9 @@ lp_build_sample_offset(struct lp_build_context *bld, const struct util_format_description *format_desc, LLVMValueRef x, LLVMValueRef y, + LLVMValueRef z, LLVMValueRef y_stride, - LLVMValueRef data_ptr); + LLVMValueRef z_stride); void