//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
//
// Purpose: 
//
// $Header: $
// $NoKeywords: $
//=============================================================================

#ifndef IMATERIALSYSTEMSTATS_H
#define IMATERIALSYSTEMSTATS_H
#pragma once

#include "interface.h"
#include "clientstats.h"

#define MATERIAL_SYSTEM_STATS_INTERFACE_VERSION "VMaterialSystemStats005"

enum MaterialSystemStatsGroup_t
{
	MATERIAL_SYSTEM_STATS_OTHER = 0,
	MATERIAL_SYSTEM_STATS_WORLD,
	MATERIAL_SYSTEM_STATS_STATIC_PROPS,
	MATERIAL_SYSTEM_STATS_TOTAL,
	// NOTE!!  If you update this, make sure and update s_StatGroupNames in CMaterialSystemStats.cpp

	MATERIAL_SYSTEM_STATS_NUM_GROUPS,
};

enum MaterialSystemCountedStatId_t
{
	MATERIAL_SYSTEM_STATS_TEXTURE_STATE = 0,
	MATERIAL_SYSTEM_STATS_DYNAMIC_STATE,
	MATERIAL_SYSTEM_STATS_SHADOW_STATE,
	MATERIAL_SYSTEM_STATS_NUM_TEXELS,
	MATERIAL_SYSTEM_STATS_NUM_BYTES,
	MATERIAL_SYSTEM_STATS_NUM_UNIQUE_TEXELS,
	MATERIAL_SYSTEM_STATS_NUM_UNIQUE_BYTES,
	MATERIAL_SYSTEM_STATS_TEXTURE_BYTES_DOWNLOADED,
	MATERIAL_SYSTEM_STATS_TEXTURE_TEXELS_DOWNLOADED,
	MATERIAL_SYSTEM_STATS_NUM_INDEX_PRIMITIVE_CALLS,
	MATERIAL_SYSTEM_STATS_NUM_PRIMITIVES,
	MATERIAL_SYSTEM_STATS_TEXTURE_UPLOADS,
	MATERIAL_SYSTEM_STATS_NUM_UNIQUE_TEXTURES,
	MATERIAL_SYSTEM_STATS_FILL_RATE,
	MATERIAL_SYSTEM_STATS_NUM_BUFFER_LOCK,
	MATERIAL_SYSTEM_STATS_TEXTURE_BYTES_ALLOCATED,
	MATERIAL_SYSTEM_STATS_MODEL_BYTES_ALLOCATED,
	MATERIAL_SYSTEM_STATS_TEXTURE_BYTES_NEW_THIS_FRAME,
	MATERIAL_SYSTEM_STATS_LIGHTMAP_BYTES_ALLOCATED,
	MATERIAL_SYSTEM_STATS_VERTEX_TRANSFORM,
	MATERIAL_SYSTEM_STATS_NUM_PIXEL_SHADER_CREATES,
	MATERIAL_SYSTEM_STATS_NUM_VERTEX_SHADER_CREATES,
	// NOTE!!!  If you update here, make sure and update names in CMaterialSystemStats.cpp

	MATERIAL_SYSTEM_STATS_NUM_COUNTED_STATS
};

enum MaterialSystemTimedStatId_t
{
	MATERIAL_SYSTEM_STATS_VERTEX_COPY_TIME = 0,
	MATERIAL_SYSTEM_STATS_RENDER_PASS_TIME,
	MATERIAL_SYSTEM_STATS_MESH_BUILD_TIME,
	MATERIAL_SYSTEM_STATS_AMBIENT_CUBE_TIME,
	MATERIAL_SYSTEM_STATS_BUFFER_LOCK_TIME,
	MATERIAL_SYSTEM_STATS_BUFFER_UNLOCK_TIME,
	MATERIAL_SYSTEM_STATS_SWAP_TIME,
	MATERIAL_SYSTEM_STATS_SET_RENDER_STATE,
	MATERIAL_SYSTEM_STATS_DRAW_INDEXED_PRIMITIVE,
	MATERIAL_SYSTEM_STATS_SET_TRANSFORM,
	MATERIAL_SYSTEM_STATS_TRANSFORM_COPY,
	MATERIAL_SYSTEM_STATS_UPDATE_FLUSH,
	MATERIAL_SYSTEM_STATS_TFF,
	MATERIAL_SYSTEM_STATS_AMBIENT_LOCK,
	MATERIAL_SYSTEM_STATS_COMMIT_STATE_TIME,
	MATERIAL_SYSTEM_STATS_COMMIT_TRANSFORMS_TIME,
	MATERIAL_SYSTEM_STATS_COMMIT_LIGHTING_TIME,
	MATERIAL_SYSTEM_STATS_VERTEX_SHADER_CONSTANT_TIME,
	MATERIAL_SYSTEM_STATS_CLEAR_TIME,
	MATERIAL_SYSTEM_STATS_SET_VERTEX_SHADER,
	MATERIAL_SYSTEM_STATS_SET_PIXEL_SHADER,
	MATERIAL_SYSTEM_STATS_DRAW_MESH,
	MATERIAL_SYSTEM_STATS_SET_TEXTURE,
	MATERIAL_SYSTEM_STATS_BEGIN_PASS,
	MATERIAL_SYSTEM_STATS_UPDATE_MATRIX_TRANSFORM,
	MATERIAL_SYSTEM_STATS_FLUSH,
	MATERIAL_SYSTEM_STATS_FOG_MODE,
	MATERIAL_SYSTEM_STATS_SHADEMODE,
	MATERIAL_SYSTEM_STATS_COLOR4F,
	MATERIAL_SYSTEM_STATS_AMBIENT_VERTEX,
	MATERIAL_SYSTEM_STATS_COMMIT_VIEW_TIME,
	MATERIAL_SYSTEM_STATS_COMMIT_VIEWMODEL_TIME,
	MATERIAL_SYSTEM_STATS_TEST1,
	MATERIAL_SYSTEM_STATS_TEST2,
	MATERIAL_SYSTEM_STATS_TEST3,
	MATERIAL_SYSTEM_STATS_TEST4,
	MATERIAL_SYSTEM_STATS_TEST5,
	MATERIAL_SYSTEM_STATS_FLUSH_HARDWARE,
	MATERIAL_SYSTEM_STATS_READ_PIXEL_SHADER_TIME,
	MATERIAL_SYSTEM_STATS_ASSEMBLE_PIXEL_SHADER_TIME,
	MATERIAL_SYSTEM_STATS_CREATE_PIXEL_SHADER_TIME,
	MATERIAL_SYSTEM_STATS_CREATE_VERTEX_SHADER_TIME,
	// NOTE!!!  If you update here, make sure and update names in CMaterialSystemStats.cpp
	MATERIAL_SYSTEM_STATS_NUM_TIMED_STATS
};

class IMaterialSystemStats : public CBaseClientStats<MATERIAL_SYSTEM_STATS_NUM_TIMED_STATS,MATERIAL_SYSTEM_STATS_NUM_COUNTED_STATS>
{
public:
	// These are used to delimit world rendering so that we can get separate
	// stats on world rendering and everything else.
	virtual void SetStatGroup( int groupID ) = 0;

	virtual int GetNumStatGroups( void ) const = 0;

	virtual const char *GetStatGroupName( int groupID ) const = 0;

	virtual const char *GetCountedStatName( int statID ) const = 0;
	virtual const char *GetTimedStatName( int statID ) const = 0;
};

#endif // IMATERIALSYSTEMSTATS_H
