AMD GPU Services (AGS)
Functions
Shader Compiler Controls

API for controlling DirectX11 shader compilation. Check support for this feature using the AGS_DX11_EXTENSION_CREATE_SHADER_CONTROLS bit. Supported in Radeon Software Version 16.9.2 (driver version 16.40.2311) onwards. More...

Functions

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount (AGSContext *context, unsigned int numberOfThreads)
 This method can be used to limit the maximum number of threads the driver uses for asynchronous shader compilation. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NumPendingAsyncCompileJobs (AGSContext *context, unsigned int *numberOfJobs)
 This method can be used to determine the total number of asynchronous shader compile jobs that are either queued for waiting for compilation or being compiled by the driver's asynchronous compilation threads. More...
 
AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDiskShaderCacheEnabled (AGSContext *context, int enable)
 This method can be used to enable or disable the disk based shader cache. More...
 

Detailed Description

API for controlling DirectX11 shader compilation. Check support for this feature using the AGS_DX11_EXTENSION_CREATE_SHADER_CONTROLS bit. Supported in Radeon Software Version 16.9.2 (driver version 16.40.2311) onwards.

Function Documentation

◆ agsDriverExtensionsDX11_NumPendingAsyncCompileJobs()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_NumPendingAsyncCompileJobs ( AGSContext *  context,
unsigned int *  numberOfJobs 
)

This method can be used to determine the total number of asynchronous shader compile jobs that are either queued for waiting for compilation or being compiled by the driver's asynchronous compilation threads.

This method can be called at any during the lifetime of the driver.

Parameters
[in]contextPointer to a context.
[out]numberOfJobsPointer to the number of jobs in flight currently.

◆ agsDriverExtensionsDX11_SetDiskShaderCacheEnabled()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetDiskShaderCacheEnabled ( AGSContext *  context,
int  enable 
)

This method can be used to enable or disable the disk based shader cache.

Enabling/disabling the disk cache is not supported if is it disabled explicitly via Radeon Settings or by an app profile. Calling this method under these conditions will result in AGS_FAILURE being returned. It is recommended that this method be called before any shaders are created by the application and being compiled by the driver. Doing so at any other time may result in the cache being left in an inconsistent state.

Parameters
[in]contextPointer to a context.
[in]enableWhether to enable the disk cache. 0 to disable, 1 to enable.

◆ agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_SetMaxAsyncCompileThreadCount ( AGSContext *  context,
unsigned int  numberOfThreads 
)

This method can be used to limit the maximum number of threads the driver uses for asynchronous shader compilation.

Setting it to 0 will disable asynchronous compilation completely and force the shaders to be compiled "inline" on the threads that call Create*Shader.

This method can only be called before any shaders are created and being compiled by the driver. If this method is called after shaders have been created the function will return AGS_FAILURE. This function only sets an upper limit.The driver may create fewer threads than allowed by this function.

Parameters
[in]contextPointer to a context.
[in]numberOfThreadsThe maximum number of threads to use.