mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
asahi: Use the sampler heap
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
This commit is contained in:
parent
dc44619c62
commit
21d3c1e0af
1 changed files with 11 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ agx_upload_stage_uniforms(struct agx_batch *batch, uint64_t textures,
|
|||
{
|
||||
struct agx_context *ctx = batch->ctx;
|
||||
struct agx_stage *st = &ctx->stage[stage];
|
||||
struct agx_device *dev = agx_device(ctx->base.screen);
|
||||
|
||||
struct agx_ptr root_ptr = agx_pool_alloc_aligned(
|
||||
&batch->pool, sizeof(struct agx_stage_uniforms), 16);
|
||||
|
|
@ -101,6 +102,16 @@ agx_upload_stage_uniforms(struct agx_batch *batch, uint64_t textures,
|
|||
uniforms.lod_bias[s] = st->samplers[s]->lod_bias_as_fp16;
|
||||
}
|
||||
|
||||
/* If we use bindless samplers, insert sampler into the heap */
|
||||
if (st->shader && st->shader->uses_bindless_samplers) {
|
||||
u_foreach_bit(s, st->valid_samplers) {
|
||||
uniforms.sampler_handle[s] =
|
||||
28 +
|
||||
agx_sampler_heap_add(dev, &batch->sampler_heap,
|
||||
&st->samplers[s]->desc_without_custom_border);
|
||||
}
|
||||
}
|
||||
|
||||
u_foreach_bit(cb, st->cb_mask) {
|
||||
uniforms.ubo_base[cb] = agx_const_buffer_ptr(batch, &st->cb[cb]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue