mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- fixed survey data retrieval for Vulkan.
This commit is contained in:
parent
9003766133
commit
9e17eae2fd
6 changed files with 24 additions and 6 deletions
|
@ -257,11 +257,10 @@ static int GetCoreInfo()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXTERN_CVAR(Int, vid_enablevulkan)
|
|
||||||
|
|
||||||
static int GetRenderInfo()
|
static int GetRenderInfo()
|
||||||
{
|
{
|
||||||
if (vid_enablevulkan == 1) return 4;
|
if (screen->Backend() == 1) return 4;
|
||||||
auto info = gl_getInfo();
|
auto info = gl_getInfo();
|
||||||
if (!info.second)
|
if (!info.second)
|
||||||
{
|
{
|
||||||
|
@ -273,6 +272,7 @@ static int GetRenderInfo()
|
||||||
|
|
||||||
static int GetGLVersion()
|
static int GetGLVersion()
|
||||||
{
|
{
|
||||||
|
if (screen->Backend() == 1) return 50;
|
||||||
auto info = gl_getInfo();
|
auto info = gl_getInfo();
|
||||||
return int(info.first * 10);
|
return int(info.first * 10);
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ void D_DoAnonStats()
|
||||||
|
|
||||||
static char requeststring[1024];
|
static char requeststring[1024];
|
||||||
mysnprintf(requeststring, sizeof requeststring, "GET /stats_201903.py?render=%i&cores=%i&os=%i&glversion=%i&vendor=%s&model=%s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: %s %s\r\n\r\n",
|
mysnprintf(requeststring, sizeof requeststring, "GET /stats_201903.py?render=%i&cores=%i&os=%i&glversion=%i&vendor=%s&model=%s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: %s %s\r\n\r\n",
|
||||||
GetRenderInfo(), GetCoreInfo(), GetOSVersion(), GetGLVersion(), URLencode(gl.vendorstring).GetChars(), URLencode(gl.modelstring).GetChars(), sys_statshost.GetHumanString(), GAMENAME, VERSIONSTR);
|
GetRenderInfo(), GetCoreInfo(), GetOSVersion(), GetGLVersion(), URLencode(screen->vendorstring).GetChars(), URLencode(screen->DeviceName()).GetChars(), sys_statshost.GetHumanString(), GAMENAME, VERSIONSTR);
|
||||||
DPrintf(DMSG_NOTIFY, "Sending %s", requeststring);
|
DPrintf(DMSG_NOTIFY, "Sending %s", requeststring);
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
// Don't send info in debug builds
|
// Don't send info in debug builds
|
||||||
|
|
|
@ -237,6 +237,11 @@ uint32_t OpenGLFrameBuffer::GetCaps()
|
||||||
return (uint32_t)FlagSet;
|
return (uint32_t)FlagSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* OpenGLFrameBuffer::DeviceName() const
|
||||||
|
{
|
||||||
|
return gl.modelstring;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// Swap the buffers
|
// Swap the buffers
|
||||||
|
|
|
@ -27,6 +27,7 @@ public:
|
||||||
void CleanForRestart() override;
|
void CleanForRestart() override;
|
||||||
void UpdatePalette() override;
|
void UpdatePalette() override;
|
||||||
uint32_t GetCaps() override;
|
uint32_t GetCaps() override;
|
||||||
|
const char* DeviceName() const override;
|
||||||
void WriteSavePic(player_t *player, FileWriter *file, int width, int height) override;
|
void WriteSavePic(player_t *player, FileWriter *file, int width, int height) override;
|
||||||
sector_t *RenderView(player_t *player) override;
|
sector_t *RenderView(player_t *player) override;
|
||||||
void SetTextureFilterMode() override;
|
void SetTextureFilterMode() override;
|
||||||
|
|
|
@ -475,6 +475,8 @@ public:
|
||||||
// Report a game restart
|
// Report a game restart
|
||||||
void SetClearColor(int color);
|
void SetClearColor(int color);
|
||||||
virtual uint32_t GetCaps();
|
virtual uint32_t GetCaps();
|
||||||
|
virtual int Backend() { return 0; }
|
||||||
|
virtual const char* DeviceName() const { return "Unknown"; }
|
||||||
virtual void WriteSavePic(player_t *player, FileWriter *file, int width, int height);
|
virtual void WriteSavePic(player_t *player, FileWriter *file, int width, int height);
|
||||||
virtual sector_t *RenderView(player_t *player) { return nullptr; }
|
virtual sector_t *RenderView(player_t *player) { return nullptr; }
|
||||||
|
|
||||||
|
|
|
@ -131,10 +131,11 @@ void VulkanFrameBuffer::InitializeState()
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use the same names here as OpenGL returns.
|
||||||
switch (device->PhysicalDevice.Properties.vendorID)
|
switch (device->PhysicalDevice.Properties.vendorID)
|
||||||
{
|
{
|
||||||
case 0x1002: vendorstring = "AMD"; break;
|
case 0x1002: vendorstring = "ATI Technologies Inc."; break;
|
||||||
case 0x10DE: vendorstring = "NVIDIA"; break;
|
case 0x10DE: vendorstring = "NVIDIA Corporation"; break;
|
||||||
case 0x8086: vendorstring = "Intel"; break;
|
case 0x8086: vendorstring = "Intel"; break;
|
||||||
default: vendorstring = "Unknown"; break;
|
default: vendorstring = "Unknown"; break;
|
||||||
}
|
}
|
||||||
|
@ -623,6 +624,13 @@ uint32_t VulkanFrameBuffer::GetCaps()
|
||||||
return (uint32_t)FlagSet;
|
return (uint32_t)FlagSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* VulkanFrameBuffer::DeviceName() const
|
||||||
|
{
|
||||||
|
const auto &props = device->PhysicalDevice.Properties;
|
||||||
|
return props.deviceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void VulkanFrameBuffer::SetVSync(bool vsync)
|
void VulkanFrameBuffer::SetVSync(bool vsync)
|
||||||
{
|
{
|
||||||
// This is handled in VulkanSwapChain::AcquireImage.
|
// This is handled in VulkanSwapChain::AcquireImage.
|
||||||
|
@ -924,7 +932,7 @@ unsigned int VulkanFrameBuffer::GetLightBufferBlockSize() const
|
||||||
|
|
||||||
void VulkanFrameBuffer::PrintStartupLog()
|
void VulkanFrameBuffer::PrintStartupLog()
|
||||||
{
|
{
|
||||||
const auto props = device->PhysicalDevice.Properties;
|
const auto &props = device->PhysicalDevice.Properties;
|
||||||
|
|
||||||
FString deviceType;
|
FString deviceType;
|
||||||
switch (props.deviceType)
|
switch (props.deviceType)
|
||||||
|
|
|
@ -76,6 +76,8 @@ public:
|
||||||
void PrecacheMaterial(FMaterial *mat, int translation) override;
|
void PrecacheMaterial(FMaterial *mat, int translation) override;
|
||||||
void UpdatePalette() override;
|
void UpdatePalette() override;
|
||||||
uint32_t GetCaps() override;
|
uint32_t GetCaps() override;
|
||||||
|
const char* DeviceName() const override;
|
||||||
|
int Backend() override { return 1; }
|
||||||
void WriteSavePic(player_t *player, FileWriter *file, int width, int height) override;
|
void WriteSavePic(player_t *player, FileWriter *file, int width, int height) override;
|
||||||
sector_t *RenderView(player_t *player) override;
|
sector_t *RenderView(player_t *player) override;
|
||||||
void SetTextureFilterMode() override;
|
void SetTextureFilterMode() override;
|
||||||
|
|
Loading…
Reference in a new issue