mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
gallivm: add information about different sampler/view units if analyzing shader
Useful to know in some cases. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
4824eecc0c
commit
7ede5a1a7b
2 changed files with 10 additions and 0 deletions
|
|
@ -126,6 +126,12 @@ struct lp_tgsi_info
|
|||
*/
|
||||
unsigned indirect_textures:1;
|
||||
|
||||
/*
|
||||
* Whether any of the texture (sample) ocpodes use different sampler
|
||||
* and sampler view unit.
|
||||
*/
|
||||
unsigned sampler_texture_units_different:1;
|
||||
|
||||
/*
|
||||
* Whether any immediate values are outside the range of 0 and 1
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -243,6 +243,10 @@ analyse_sample(struct analysis_context *ctx,
|
|||
tex_info->texture_unit = inst->Src[1].Register.Index;
|
||||
tex_info->sampler_unit = inst->Src[2].Register.Index;
|
||||
|
||||
if (tex_info->texture_unit != tex_info->sampler_unit) {
|
||||
info->sampler_texture_units_different = TRUE;
|
||||
}
|
||||
|
||||
if (modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_DERIV ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_EXPLICIT_LOD ||
|
||||
modifier == LP_BLD_TEX_MODIFIER_LOD_BIAS || shadow) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue