From: Connor Abbott Date: Fri, 6 Mar 2020 10:29:54 +0000 (+0100) Subject: freedreno/a6xx: Add registers for the bindless model X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=122a900d7de826dcd1056f2ad2ea4c72d9129c06;p=mesa.git freedreno/a6xx: Add registers for the bindless model In Vulkan, descriptors for samplers, SSBO's, etc. are collected into descriptor sets, and shaders can use multiple descriptor sets. At command-recording time, users can swap out only some of the descriptor sets, and the driver is supposed to do the minimum amount necessary to update any internal binding tables, knowing that only some of the descriptors have changed. With the old binding model, focused on GL, where there are separate tables for each type of resource, we can do somewhat better than now by preserving descriptors from lower descriptor sets when switching higher descriptor sets. However we still have to copy around descriptors before each draw. At least for a6xx, qualcomm went further, essentially copying the Vulkan binding model as an alternate way to load resources. There's an array of registers (actually an array for compute and one for everything else), where each register holds a pointer to a descriptor set that can contain various different descriptor types. The descriptors are padded out to 16 dwords, so that every instruction can use an index instead of a dword offset. It's called "bindless", I think, because it can also be used to implement the old GL bindless extensions (presumably it allows more samplers and textures than the old model). This commit adds the register and cmdstream parts. Next up will be the instruction encoding. Part-of: --- diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index 522f067a11d..ad60d5ddfbf 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -2788,6 +2788,15 @@ to upconvert to 32b float internally? + + + + + + + + + + + + + + @@ -3022,6 +3042,10 @@ to upconvert to 32b float internally? + + + + per MRT @@ -3049,6 +3073,10 @@ to upconvert to 32b float internally? + + + + + + + + @@ -3228,6 +3261,11 @@ to upconvert to 32b float internally? + + + + + diff --git a/src/freedreno/registers/adreno_pm4.xml b/src/freedreno/registers/adreno_pm4.xml index c5d83d06550..23800f781da 100644 --- a/src/freedreno/registers/adreno_pm4.xml +++ b/src/freedreno/registers/adreno_pm4.xml @@ -607,6 +607,7 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords) +