params.explicit_lod = explicit_lod;
params.is_sviewinfo = TRUE;
params.sizes_out = sizes_out;
+ params.samples_only = false;
if (instr->op == nir_texop_query_levels)
params.explicit_lod = bld_base->uint_bld.zero;
lp_build_context_init(&bld_int_vec4, gallivm, lp_type_int_vec(32, 128));
+ if (params->samples_only) {
+ params->sizes_out[0] = lp_build_broadcast(gallivm, lp_build_vec_type(gallivm, params->int_type),
+ dynamic_state->num_samples(dynamic_state, gallivm,
+ context_ptr, texture_unit));
+ return;
+ }
if (params->explicit_lod) {
/* FIXME: this needs to honor per-element lod */
lod = LLVMBuildExtractElement(gallivm->builder, params->explicit_lod,
params.lod_property = lod_property;
params.explicit_lod = explicit_lod;
params.sizes_out = sizes_out;
+ params.samples_only = false;
bld->sampler->emit_size_query(bld->sampler,
bld->bld_base.base.gallivm,