mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 08:10:37 +02:00
hk: plumb sampler state counts
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36127>
This commit is contained in:
parent
4a9ae295cd
commit
49f042c5e8
2 changed files with 8 additions and 3 deletions
|
|
@ -76,7 +76,8 @@ hk_dispatch_with_usc(struct hk_device *dev, struct hk_cs *cs,
|
|||
struct agx_cdm_launch_word_0_packed launch;
|
||||
agx_pack(&launch, CDM_LAUNCH_WORD_0, cfg) {
|
||||
cfg.texture_state_register_count = info->texture_state_count;
|
||||
cfg.sampler_state_register_count = 1;
|
||||
cfg.sampler_state_register_count =
|
||||
agx_translate_sampler_state_count(info->sampler_state_count, false);
|
||||
cfg.uniform_register_count = info->push_count;
|
||||
cfg.preshader_register_count = info->nr_preamble_gprs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -915,7 +915,7 @@ hk_upload_shader(struct hk_device *dev, struct hk_shader *shader)
|
|||
cfg.uniform_register_count = shader->b.info.push_count;
|
||||
cfg.preshader_register_count = shader->b.info.nr_preamble_gprs;
|
||||
cfg.sampler_state_register_count = agx_translate_sampler_state_count(
|
||||
shader->b.info.uses_txf ? 1 : 0, false);
|
||||
shader->b.info.sampler_state_count, false);
|
||||
cfg.texture_state_register_count = shader->b.info.texture_state_count;
|
||||
}
|
||||
}
|
||||
|
|
@ -1676,13 +1676,17 @@ hk_fast_link(struct hk_device *dev, bool fragment, struct hk_shader *main,
|
|||
nr_samples_shaded);
|
||||
|
||||
if (fragment) {
|
||||
unsigned samplers = main->b.info.sampler_state_count;
|
||||
if (s->b.uses_txf)
|
||||
samplers = MAX2(samplers, 1);
|
||||
|
||||
agx_pack(&s->fs_counts, FRAGMENT_SHADER_WORD_0, cfg) {
|
||||
cfg.cf_binding_count = s->b.cf.nr_bindings;
|
||||
cfg.uniform_register_count = main->b.info.push_count;
|
||||
cfg.preshader_register_count = main->b.info.nr_preamble_gprs;
|
||||
cfg.texture_state_register_count = main->b.info.texture_state_count;
|
||||
cfg.sampler_state_register_count =
|
||||
agx_translate_sampler_state_count(s->b.uses_txf ? 1 : 0, false);
|
||||
agx_translate_sampler_state_count(samplers, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue