AMD GPU Services (AGS)
Typedefs | Enumerations | Functions
Extended Topology

API for primitive topologies. More...

Typedefs

typedef enum AGSPrimitiveTopologyDX11 AGSPrimitiveTopologyDX11
 Additional topologies supported via extensions.
 

Enumerations

enum  AGSPrimitiveTopologyDX11 { AGS_PRIMITIVE_TOPOLOGY_QUADLIST = 7, AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST = 9 }
 Additional topologies supported via extensions. More...
 

Functions

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology (AGSContext *context, D3D_PRIMITIVE_TOPOLOGY topology)
 Function used to set the primitive topology. More...
 

Detailed Description

API for primitive topologies.

Enumeration Type Documentation

◆ AGSPrimitiveTopologyDX11

Additional topologies supported via extensions.

Enumerator
AGS_PRIMITIVE_TOPOLOGY_QUADLIST 

Quad list.

AGS_PRIMITIVE_TOPOLOGY_SCREENRECTLIST 

Screen rect list.

Function Documentation

◆ agsDriverExtensionsDX11_IASetPrimitiveTopology()

AMD_AGS_API AGSReturnCode agsDriverExtensionsDX11_IASetPrimitiveTopology ( AGSContext *  context,
D3D_PRIMITIVE_TOPOLOGY  topology 
)

Function used to set the primitive topology.

If you are using any of the extended topology types, then this function should be called to set ALL topology types.

The Quad List extension is a convenient way to submit quads without using an index buffer. Note that this still submits two triangles at the driver level. In order to use this function, AGS must already be initialized and agsDriverExtensionsDX11_Init must have been called successfully.

The Screen Rect extension, which is only available on GCN hardware, allows the user to pass in three of the four corners of a rectangle. The hardware then uses the bounding box of the vertices to rasterize the rectangle primitive (i.e. as a rectangle rather than two triangles).

Note
Note that this will not return valid interpolated values, only valid SV_Position values.
If either the Quad List or Screen Rect extension are used, then agsDriverExtensionsDX11_IASetPrimitiveTopology should be called in place of the native DirectX11 equivalent all the time.
Parameters
[in]contextPointer to a context.
[in]topologyThe topology to set on the D3D11 device. This can be either an AGS-defined topology such as AGS_PRIMITIVE_TOPOLOGY_QUADLIST or a standard D3D-defined topology such as D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP. NB. the AGS-defined types will require casting to a D3D_PRIMITIVE_TOPOLOGY type.