mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
VertexLoaderManager: Add methods to generate "uber" vertex formats
These vertex formats enable all attributes. Inactive attributes are set to offset=0, and the smallest type possible. This "optimization" stops the NV compiler from generating variants of vertex shaders.
This commit is contained in:
@ -26,6 +26,16 @@ void MarkAllDirty();
|
||||
|
||||
NativeVertexFormatMap* GetNativeVertexFormatMap();
|
||||
|
||||
// Creates or obtains a pointer to a VertexFormat representing decl.
|
||||
// If this results in a VertexFormat being created, if the game later uses a matching vertex
|
||||
// declaration, the one that was previously created will be used.
|
||||
NativeVertexFormat* GetOrCreateMatchingFormat(const PortableVertexDeclaration& decl);
|
||||
|
||||
// For vertex ubershaders, all attributes need to be present, even when the vertex
|
||||
// format does not contain them. This function returns a vertex format with dummy
|
||||
// offsets set to the unused attributes.
|
||||
NativeVertexFormat* GetUberVertexFormat(const PortableVertexDeclaration& decl);
|
||||
|
||||
// Returns -1 if buf_size is insufficient, else the amount of bytes consumed
|
||||
int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bool is_preprocess);
|
||||
|
||||
|
Reference in New Issue
Block a user