turnip: Return correct value of tu6_load_state_size
authorHyunjun Ko <zzoon@igalia.com>
Tue, 16 Feb 2021 07:44:43 +0000 (07:44 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 17 Mar 2021 01:09:30 +0000 (01:09 +0000)
commite0e55b181f3fad65e9f2c0b4c620474fbe941c66
tree59d49d699a49928344e79e94e4c7195acc857d0a
parentfdbcb58c06869d0ce6051fde7037dedf62ba2acf
turnip: Return correct value of tu6_load_state_size

The state of active_desc_sets in pipeline should be set before
allocation of the pipeline so we get correct size of descriptor
sets and reserve enough space upfront.

Otherwise we might hit assert(pipeline->cs.bo_count == 1).

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>
src/freedreno/vulkan/tu_pipeline.c