asahi/clc: promote bindless textures
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35949>
This commit is contained in:
@@ -347,6 +347,13 @@ main(int argc, char **argv)
|
||||
bool is_helper = !strcmp(libfunc->name, "libagx_helper");
|
||||
struct agx_shader_key key = {
|
||||
.promote_constants = !is_helper,
|
||||
|
||||
/* Most of the internal programs don't use textures at all, but
|
||||
* the few that do are exclusively bindless, so we want to
|
||||
* promote their access.
|
||||
*/
|
||||
.promote_textures = true,
|
||||
|
||||
.reserved_preamble = layout.size_B / 2,
|
||||
.is_helper = is_helper,
|
||||
};
|
||||
|
||||
@@ -178,6 +178,7 @@ static inline struct agx_precompiled_kernel_info
|
||||
agx_compact_kernel_info(struct agx_shader_info *info)
|
||||
{
|
||||
assert(info->has_preamble == (info->nr_preamble_gprs > 0));
|
||||
assert(info->texture_state_count <= 8 && "static maximum, no need to plumb");
|
||||
|
||||
return (struct agx_precompiled_kernel_info){
|
||||
.preamble_offset = info->preamble_offset,
|
||||
|
||||
@@ -261,7 +261,7 @@ agx_get_precompiled_locked(struct agx_bg_eot_cache *cache, unsigned program)
|
||||
|
||||
/* Bake launch */
|
||||
agx_pack(&p->b.launch, CDM_LAUNCH_WORD_0, cfg) {
|
||||
cfg.texture_state_register_count = 0;
|
||||
cfg.texture_state_register_count = 8 /* same encoding as 0 */;
|
||||
cfg.sampler_state_register_count = 1;
|
||||
cfg.uniform_register_count = info->push_count;
|
||||
cfg.preshader_register_count = info->nr_preamble_gprs;
|
||||
|
||||
Reference in New Issue
Block a user