GpaGetFuncTable

Syntax

Copied!

GpaStatus GpaGetFuncTable(
    void* gpa_func_table);

Description

Gets the GPA API function table. gpa_func_table is both an input and output parameter, whose type is GpaFunctionTable*. Prior to calling this function the major_version and minor_version should be set by the caller. When compiling in C++ mode, these will be set automatically. When compiling in C mode, they will need to be set manually to GPA_FUNCTION_TABLE_MAJOR_VERSION_NUMBER and GPA_FUNCTION_TABLE_MINOR_VERSION_NUMBER, respectively. After execution of this function, the major_version and minor_version members will be set to the major and minor version of the GPUPerfAPI library that is loaded. If the versions are determined to be incompatible, the function will return an error.

The minor version of the function table is calculated as the size of the function table structure. This allows for additional functions to be added to the end of the table in future versions, while still maintaining backwards-compatibility. If the minor version number specified by the caller is lower than the minor version number of the GPUPerfAPI library, GpaGetFuncTable will assign the function pointers of the input structure up to the size of the structure (as specified by the minor version). The caller can detect this situation by checking the value of minor_version after successful execution. If the value is larger than the original value, the caller can infer that the version of the GPUPerfAPI library loaded has some additional API functions available that were not present in older versions of the library. The caller can recompile using the newer GPUPerfAPI header files to gain access to the new functions.

If non-backwards compatible changes are ever made in a new version of GPUPerfAPI, the major version of the API table will be incremented. Examples of non-backwards compatible changes would be removal of a public function or changing the signature of a public function. In the case where the major version number specified by the caller differs from the major version number of the GPUPerfAPI library, this function will set the major_version member to the major version of the GPUPerfAPI library that was loaded and return an error.

Parameters

Name

Description

gpa_func_table

Pointer to the GPA function table structure.

Return value

Return value

Description

kGpaStatusOk

The function table was successfully retrieved.

kGpaStatusErrorNullPointer

The supplied gpa_func_table parameter is NULL.

kGpaStatusErrorLibLoadMajorVersionMismatch

The major version specified by the caller is different from the major version of the GPUPerfAPI library that was loaded.

kGpaStatusErrorLibLoadMinorVersionMismatch

The minor version specified by the caller is greater than the major version of the GPUPerfAPI library that was loaded.

kGpaStatusErrorException

Exception occurred.

Related pages

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNAâ„¢ 2 GPUs, AMD Ryzenâ„¢ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!