diff options
author | Dave Airlie <airlied@redhat.com> | 2016-04-18 11:45:12 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-04-19 07:33:39 +1000 |
commit | 3a26ef23e78f811abdfe657b52b9bc057b9ce5b6 (patch) | |
tree | c883b658fe51853a506bc80d1fe1f4f4e79398e3 /src/gallium/drivers | |
parent | 3227c10270f8b7e8bb66bb7d50531fec8be75adb (diff) | |
download | external_mesa3d-3a26ef23e78f811abdfe657b52b9bc057b9ce5b6.zip external_mesa3d-3a26ef23e78f811abdfe657b52b9bc057b9ce5b6.tar.gz external_mesa3d-3a26ef23e78f811abdfe657b52b9bc057b9ce5b6.tar.bz2 |
gallivm: convert size query to using a set of parameters.
This isn't currently that easy to expand, so fix it up
before expanding it later to include dynamic samplers.
[airlied: use some local variables (Roland)]
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_tex_sample.c | 22 | ||||
-rw-r--r-- | src/gallium/drivers/swr/swr_tex_sample.cpp | 22 |
2 files changed, 8 insertions, 36 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c index 5762b7b..8adaa8e 100644 --- a/src/gallium/drivers/llvmpipe/lp_tex_sample.c +++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c @@ -276,30 +276,16 @@ lp_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base, static void lp_llvm_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base, struct gallivm_state *gallivm, - struct lp_type type, - unsigned texture_unit, - unsigned target, - LLVMValueRef context_ptr, - boolean is_sviewinfo, - enum lp_sampler_lod_property lod_property, - LLVMValueRef explicit_lod, /* optional */ - LLVMValueRef *sizes_out) + const struct lp_sampler_size_query_params *params) { struct lp_llvm_sampler_soa *sampler = (struct lp_llvm_sampler_soa *)base; - assert(texture_unit < PIPE_MAX_SHADER_SAMPLER_VIEWS); + assert(params->texture_unit < PIPE_MAX_SHADER_SAMPLER_VIEWS); lp_build_size_query_soa(gallivm, - &sampler->dynamic_state.static_state[texture_unit].texture_state, + &sampler->dynamic_state.static_state[params->texture_unit].texture_state, &sampler->dynamic_state.base, - type, - texture_unit, - target, - context_ptr, - is_sviewinfo, - lod_property, - explicit_lod, - sizes_out); + params); } diff --git a/src/gallium/drivers/swr/swr_tex_sample.cpp b/src/gallium/drivers/swr/swr_tex_sample.cpp index 8172c82..66d6b0f 100644 --- a/src/gallium/drivers/swr/swr_tex_sample.cpp +++ b/src/gallium/drivers/swr/swr_tex_sample.cpp @@ -302,31 +302,17 @@ swr_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base, static void swr_sampler_soa_emit_size_query(const struct lp_build_sampler_soa *base, struct gallivm_state *gallivm, - struct lp_type type, - unsigned texture_unit, - unsigned target, - LLVMValueRef context_ptr, - boolean is_sviewinfo, - enum lp_sampler_lod_property lod_property, - LLVMValueRef explicit_lod, /* optional */ - LLVMValueRef *sizes_out) + const struct lp_sampler_size_query_params *params) { struct swr_sampler_soa *sampler = (struct swr_sampler_soa *)base; - assert(texture_unit < PIPE_MAX_SHADER_SAMPLER_VIEWS); + assert(params->texture_unit < PIPE_MAX_SHADER_SAMPLER_VIEWS); lp_build_size_query_soa( gallivm, - &sampler->dynamic_state.static_state[texture_unit].texture_state, + &sampler->dynamic_state.static_state[params->texture_unit].texture_state, &sampler->dynamic_state.base, - type, - texture_unit, - target, - context_ptr, - is_sviewinfo, - lod_property, - explicit_lod, - sizes_out); + params); } |