| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.gpu.agis |
| |
| <p>AGIS - Android GPU Inspector Service</p> |
| <div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 9</span></div> |
| |
| ## **PROTOCOLS** |
| |
| ## ComponentRegistry {#ComponentRegistry} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=49)* |
| <p>The AGIS ComponentRegistry protocol allows traceable Fuchsia components to register |
| as Vulkan traceable.</p> |
| |
| ### GetVulkanSocket {#ComponentRegistry.GetVulkanSocket} |
| |
| <p>Hanging get to retrieve the Vulkan endpoint of the ffx/vulkan Zircon |
| socket pair. This get is first satisfied when the client |
| (the AGI application) calls FfxBridge::GetSocket() on the |global_id| |
| that matches the client id |id|.</p> |
| |
| #### Request {#ComponentRegistry.GetVulkanSocket_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code><a class='link' href='#ClientId'>ClientId</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#ComponentRegistry.GetVulkanSocket_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_GetVulkanSocket_Result'>ComponentRegistry_GetVulkanSocket_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### Register {#ComponentRegistry.Register} |
| |
| <p>Register a process as traceable.</p> |
| |
| #### Request {#ComponentRegistry.Register_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code><a class='link' href='#ClientId'>ClientId</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>process_koid</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#koid'>koid</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>process_name</code></td> |
| <td> |
| <code>string[32]</code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#ComponentRegistry.Register_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_Register_Result'>ComponentRegistry_Register_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ### Unregister {#ComponentRegistry.Unregister} |
| |
| |
| #### Request {#ComponentRegistry.Unregister_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>id</code></td> |
| <td> |
| <code><a class='link' href='#ClientId'>ClientId</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#ComponentRegistry.Unregister_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_Unregister_Result'>ComponentRegistry_Unregister_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Connector {#Connector} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=91)* |
| <p>The AGIS Connector protocol provides the interface to retrieve the ffx socket endpoint.</p> |
| |
| ### GetSocket {#Connector.GetSocket} |
| |
| <p>Retrieves the ffx socket endpoint of the ffx/vulkan socket pair.</p> |
| |
| #### Request {#Connector.GetSocket_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>global_id</code></td> |
| <td> |
| <code><a class='link' href='#GlobalId'>GlobalId</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Connector.GetSocket_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#Connector_GetSocket_Result'>Connector_GetSocket_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Observer {#Observer} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=81)* |
| <p>The AGIS Observer protocol provides the interface to retrieve the full list of |
| registered Vulkan Traceable Components (vtcs).</p> |
| |
| ### Vtcs {#Observer.Vtcs} |
| |
| <p>Retrieve registered components. |
| For AGI, gapis will be the only client of this Vtcs interface.</p> |
| |
| #### Request {#Observer.Vtcs_Request} |
| |
| <EMPTY> |
| |
| |
| #### Response {#Observer.Vtcs_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>result</code></td> |
| <td> |
| <code><a class='link' href='#Observer_Vtcs_Result'>Observer_Vtcs_Result</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **STRUCTS** |
| |
| ### ComponentRegistry_GetVulkanSocket_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ComponentRegistry_GetVulkanSocket_Response data-text="ComponentRegistry_GetVulkanSocket_Response"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=73)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="ComponentRegistry_GetVulkanSocket_Response.socket"> |
| <td><code>socket</code></td> |
| <td> |
| <code>handle<socket>?</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### ComponentRegistry_Register_Response {#ComponentRegistry_Register_Response data-text="ComponentRegistry_Register_Response"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=60)* |
| |
| <EMPTY> |
| |
| ### ComponentRegistry_Unregister_Response {#ComponentRegistry_Unregister_Response data-text="ComponentRegistry_Unregister_Response"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=65)* |
| |
| <EMPTY> |
| |
| ### Connector_GetSocket_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Connector_GetSocket_Response data-text="Connector_GetSocket_Response"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=95)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Connector_GetSocket_Response.socket"> |
| <td><code>socket</code></td> |
| <td> |
| <code>handle<socket></code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| ### Observer_Vtcs_Response [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Observer_Vtcs_Response data-text="Observer_Vtcs_Response"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=84)* |
| |
| <table> |
| <tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr> |
| <tr id="Observer_Vtcs_Response.vtcs"> |
| <td><code>vtcs</code></td> |
| <td> |
| <code>vector<<a class='link' href='#Vtc'>Vtc</a>>[128]</code> |
| </td> |
| <td></td> |
| <td>No default</td> |
| </tr> |
| </table> |
| |
| |
| ## **ENUMS** |
| |
| ### Error [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Error data-text="Error"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=39)* |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Error.NOT_FOUND"> |
| <td><h3 id="Error.NOT_FOUND" class="add-link hide-from-toc">NOT_FOUND</h3></td> |
| <td><code>1</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.ALREADY_REGISTERED"> |
| <td><h3 id="Error.ALREADY_REGISTERED" class="add-link hide-from-toc">ALREADY_REGISTERED</h3></td> |
| <td><code>2</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.VTCS_EXCEEDED"> |
| <td><h3 id="Error.VTCS_EXCEEDED" class="add-link hide-from-toc">VTCS_EXCEEDED</h3></td> |
| <td><code>3</code></td> |
| <td></td> |
| </tr> |
| <tr id="Error.INTERNAL_ERROR"> |
| <td><h3 id="Error.INTERNAL_ERROR" class="add-link hide-from-toc">INTERNAL_ERROR</h3></td> |
| <td><code>4</code></td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### Vtc [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Vtc data-text="Vtc"} |
| |
| |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=23)* |
| <p>AGIS provides FIDL services that facilitate Vulkan command tracing. |
| It acts as an intermediary between gapii, the Android GPU Inspector |
| interposing shared library and Vulkan layer, and the host Android GPU |
| Inspector (AGI) application.</p> |
| <p>Vulkan Traceable Component (vtc)</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="Vtc.global_id"> |
| <td><h3 id="Vtc.global_id" class="add-link hide-from-toc">1</h3></td> |
| <td><code>global_id</code></td> |
| <td> |
| <code><a class='link' href='#GlobalId'>GlobalId</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Vtc.process_koid"> |
| <td><h3 id="Vtc.process_koid" class="add-link hide-from-toc">2</h3></td> |
| <td><code>process_koid</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#koid'>koid</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Vtc.process_name"> |
| <td><h3 id="Vtc.process_name" class="add-link hide-from-toc">3</h3></td> |
| <td><code>process_name</code></td> |
| <td> |
| <code>string[32]</code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### ComponentRegistry_GetVulkanSocket_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ComponentRegistry_GetVulkanSocket_Result data-text="ComponentRegistry_GetVulkanSocket_Result"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=73)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ComponentRegistry_GetVulkanSocket_Result.response"> |
| <td><h3 id="ComponentRegistry_GetVulkanSocket_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_GetVulkanSocket_Response'>ComponentRegistry_GetVulkanSocket_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ComponentRegistry_GetVulkanSocket_Result.err"> |
| <td><h3 id="ComponentRegistry_GetVulkanSocket_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ComponentRegistry_Register_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ComponentRegistry_Register_Result data-text="ComponentRegistry_Register_Result"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=60)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ComponentRegistry_Register_Result.response"> |
| <td><h3 id="ComponentRegistry_Register_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_Register_Response'>ComponentRegistry_Register_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ComponentRegistry_Register_Result.err"> |
| <td><h3 id="ComponentRegistry_Register_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### ComponentRegistry_Unregister_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ComponentRegistry_Unregister_Result data-text="ComponentRegistry_Unregister_Result"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=65)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="ComponentRegistry_Unregister_Result.response"> |
| <td><h3 id="ComponentRegistry_Unregister_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#ComponentRegistry_Unregister_Response'>ComponentRegistry_Unregister_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="ComponentRegistry_Unregister_Result.err"> |
| <td><h3 id="ComponentRegistry_Unregister_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### Connector_GetSocket_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Connector_GetSocket_Result data-text="Connector_GetSocket_Result"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=95)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="Connector_GetSocket_Result.response"> |
| <td><h3 id="Connector_GetSocket_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#Connector_GetSocket_Response'>Connector_GetSocket_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Connector_GetSocket_Result.err"> |
| <td><h3 id="Connector_GetSocket_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| ### Observer_Vtcs_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Observer_Vtcs_Result data-text="Observer_Vtcs_Result"} |
| *Defined in [fuchsia.gpu.agis/agis.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=84)* |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="Observer_Vtcs_Result.response"> |
| <td><h3 id="Observer_Vtcs_Result.response" class="add-link hide-from-toc">1</h3></td> |
| <td><code>response</code></td> |
| <td> |
| <code><a class='link' href='#Observer_Vtcs_Response'>Observer_Vtcs_Response</a></code> |
| </td> |
| <td></td> |
| </tr> |
| <tr id="Observer_Vtcs_Result.err"> |
| <td><h3 id="Observer_Vtcs_Result.err" class="add-link hide-from-toc">2</h3></td> |
| <td><code>err</code></td> |
| <td> |
| <code><a class='link' href='#Error'>Error</a></code> |
| </td> |
| <td></td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **CONSTANTS** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr> |
| <tr id="MAX_VTCS"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=37">MAX_VTCS</a></td> |
| <td> |
| <code>128</code> |
| </td> |
| <td><code>uint32</code></td> |
| <td><p>Max vtcs that may be registered. |
| ZX_CHANNEL_MAX_MESSAGE_BYTES = 64KiB. At an approximate message size |
| of 50B, rounding up to 64B, we easily fit 128 vtcs in a message |
| with ample headroom for message size growth.</p> |
| <p>The number of vtcs is determined by developers, rather than users. |
| The typical expected vtc count is 1 considering a developer |
| performing Vulkan tracing on 1 component at a time.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ## **TYPE ALIASES** |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="ClientId"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=12">ClientId</a></td> |
| <td> |
| <code>uint64</code></td> |
| <td><p>Client supplied id.</p> |
| </td> |
| </tr> |
| <tr id="GlobalId"> |
| <td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.gpu.agis/agis.fidl;l=15">GlobalId</a></td> |
| <td> |
| <code>uint32</code></td> |
| <td><p>Agis internally generated id.</p> |
| </td> |
| </tr> |
| </table> |