Clearly the returned values need to be per-element if the lod is per element.
Does not actually change behavior yet.
Reviewed-by: Zack Rusin <zackr@vmware.com>
struct lp_type type,
unsigned texture_unit,
boolean need_nr_mips,
+ boolean scalar_lod,
LLVMValueRef explicit_lod, /* optional */
LLVMValueRef *sizes_out)
{
type,
texture_unit,
need_nr_mips,
+ scalar_lod,
explicit_lod,
sizes_out);
}
struct lp_type int_type,
unsigned texture_unit,
boolean need_nr_mips,
+ boolean scalar_lod,
LLVMValueRef explicit_lod,
LLVMValueRef *sizes_out);
struct lp_type int_type,
unsigned texture_unit,
boolean need_nr_mips,
+ boolean scalar_lod,
LLVMValueRef explicit_lod,
LLVMValueRef *sizes_out)
{
struct lp_type type,
unsigned unit,
boolean need_nr_mips,
+ boolean scalar_lod,
LLVMValueRef explicit_lod, /* optional */
LLVMValueRef *sizes_out);
};
boolean is_sviewinfo)
{
LLVMValueRef explicit_lod;
+ boolean scalar_lod;
unsigned has_lod;
unsigned i;
unsigned unit = inst->Src[1].Register.Index;
else
explicit_lod = NULL;
+ /* TODO: use scalar lod if explicit_lod is broadcasted scalar */
+ scalar_lod = bld->bld_base.info->processor == TGSI_PROCESSOR_FRAGMENT;
+
bld->sampler->emit_size_query(bld->sampler,
bld->bld_base.base.gallivm,
bld->bld_base.int_bld.type,
unit,
is_sviewinfo,
+ scalar_lod,
explicit_lod,
sizes_out);
}
struct lp_type type,
unsigned texture_unit,
boolean need_nr_mips,
+ boolean scalar_lod,
LLVMValueRef explicit_lod, /* optional */
LLVMValueRef *sizes_out)
{
type,
texture_unit,
need_nr_mips,
+ scalar_lod,
explicit_lod,
sizes_out);
}