turnip: Change to use shared consts for PushConstants
authorHyunjun Ko <zzoon@igalia.com>
Wed, 15 Jun 2022 00:07:28 +0000 (09:07 +0900)
committerMarge Bot <emma+marge@anholt.net>
Sun, 24 Jul 2022 09:03:47 +0000 (09:03 +0000)
commite1f2cabc5e2b580ab6fceff957a1e41c408b0372
treef154970a51d6f354d87aea3cf35d9fe4f74b3506
parentce8e8051af513553a5c8140944e68be7daaba480
turnip: Change to use shared consts for PushConstants

Follow the way blob is doing for PushConstants though it supports only
128b, same as previous.

v1. Rename tu_push_constant_range.count into dwords to redue confusion.
( Danylo Piliaiev <dpiliaiev@igalia.com> )

v2. Enable shared constants only if necessary.

v3. Merge the two draw states TU_DRAW_STATE_SHADER_GEOM_CONST and
TU_DRAW_STATE_FS_CONST as shared constants are used.

Note that this leaves tu_push_constant_range in tu_shader so we could
use it again in the following patch.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_pipeline.c
src/freedreno/vulkan/tu_private.h
src/freedreno/vulkan/tu_shader.c