mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-22 20:11:43 +00:00
implemented gfxinfo
This commit is contained in:
parent
5d9b4ebd13
commit
e3f0afc117
3 changed files with 33 additions and 9 deletions
|
@ -180,6 +180,7 @@ extern "C" { __declspec(dllexport) extern const char* D3D12SDKPath = u8".\\cnq3\
|
|||
|
||||
|
||||
RHIExport rhie;
|
||||
RHIInfo rhiInfo;
|
||||
|
||||
|
||||
namespace RHI
|
||||
|
@ -2722,6 +2723,17 @@ namespace RHI
|
|||
glInfo.maxAnisotropy = 16;
|
||||
glInfo.depthFadeSupport = qtrue;
|
||||
|
||||
Q_strncpyz(glConfig.vendor_string, rhi.adapterName, sizeof(glConfig.vendor_string));
|
||||
Q_strncpyz(glConfig.renderer_string, "Direct3D 12", sizeof(glConfig.renderer_string));
|
||||
|
||||
Q_strncpyz(rhiInfo.name, "Direct3D 12", sizeof(rhiInfo.name));
|
||||
Q_strncpyz(rhiInfo.adapter, rhi.adapterName, sizeof(rhiInfo.adapter));
|
||||
rhiInfo.hasTearing = rhi.isTearingSupported;
|
||||
rhiInfo.hasBaseVRS = rhi.baseVRSSupport;
|
||||
rhiInfo.hasExtendedVRS = rhi.extendedVRSSupport;
|
||||
rhiInfo.isUMA = rhi.allocator->IsUMA();
|
||||
rhiInfo.isCacheCoherentUMA = rhi.allocator->IsCacheCoherentUMA();
|
||||
|
||||
rhi.initialized = true;
|
||||
|
||||
return true;
|
||||
|
|
|
@ -298,13 +298,15 @@ const byte *RB_TakeVideoFrameCmd( const videoFrameCommand_t *cmd )
|
|||
///////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void GfxInfo_f( void )
|
||||
static void GfxInfo_f()
|
||||
{
|
||||
if ( glConfig.vendor_string[0] != '\0' )
|
||||
ri.Printf( PRINT_ALL, "Vendor: %s\n", glConfig.vendor_string );
|
||||
if ( glConfig.renderer_string[0] != '\0' )
|
||||
ri.Printf( PRINT_ALL, "Renderer: %s\n", glConfig.renderer_string );
|
||||
//@TODO: RHI::PrintInfo();
|
||||
ri.Printf(PRINT_ALL, "RHI: %s\n", rhiInfo.name);
|
||||
ri.Printf(PRINT_ALL, "Adapter: %s\n", rhiInfo.adapter);
|
||||
ri.Printf(PRINT_ALL, " Tearing support: %s\n", rhiInfo.hasTearing ? "YES" : "NO");
|
||||
ri.Printf(PRINT_ALL, " Base VRS support: %s\n", rhiInfo.hasBaseVRS ? "YES" : "NO");
|
||||
ri.Printf(PRINT_ALL, " Extended VRS support: %s\n", rhiInfo.hasExtendedVRS ? "YES" : "NO");
|
||||
ri.Printf(PRINT_ALL, " UMA: %s\n", rhiInfo.isUMA ? "YES" : "NO");
|
||||
ri.Printf(PRINT_ALL, " Cache coherent UMA: %s\n", rhiInfo.isCacheCoherentUMA ? "YES" : "NO");
|
||||
}
|
||||
|
||||
|
||||
|
@ -758,7 +760,6 @@ void R_Init()
|
|||
R_InitMipFilter();
|
||||
|
||||
renderPipeline->Init();
|
||||
GfxInfo_f();
|
||||
|
||||
R_InitImages();
|
||||
|
||||
|
|
|
@ -1563,8 +1563,6 @@ extern int max_polyverts;
|
|||
|
||||
extern backEndData_t* backEndData;
|
||||
|
||||
void GfxInfo_f( void );
|
||||
|
||||
const byte* RB_TakeScreenshotCmd( const screenshotCommand_t* cmd );
|
||||
const byte* RB_TakeVideoFrameCmd( const videoFrameCommand_t* cmd );
|
||||
|
||||
|
@ -1692,5 +1690,18 @@ struct RHIExport
|
|||
|
||||
extern RHIExport rhie;
|
||||
|
||||
struct RHIInfo
|
||||
{
|
||||
char name[MAX_QPATH];
|
||||
char adapter[MAX_QPATH];
|
||||
qbool hasTearing;
|
||||
qbool hasBaseVRS;
|
||||
qbool hasExtendedVRS;
|
||||
qbool isUMA;
|
||||
qbool isCacheCoherentUMA;
|
||||
};
|
||||
|
||||
extern RHIInfo rhiInfo;
|
||||
|
||||
|
||||
#endif //TR_LOCAL_H
|
||||
|
|
Loading…
Reference in a new issue