mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- implemented GPU vendor string assingment in Vulkan backend
This commit is contained in:
parent
addcad8ac0
commit
dc8a944382
4 changed files with 11 additions and 4 deletions
|
@ -126,7 +126,7 @@ void OpenGLFrameBuffer::InitializeState()
|
|||
glslversion = gl.glslversion;
|
||||
uniformblockalignment = gl.uniformblockalignment;
|
||||
maxuniformblock = gl.maxuniformblock;
|
||||
gl_vendorstring = gl.vendorstring;
|
||||
vendorstring = gl.vendorstring;
|
||||
|
||||
if (first)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ FLightBuffer::FLightBuffer()
|
|||
// Hack alert: On Intel's GL driver SSBO's perform quite worse than UBOs.
|
||||
// We only want to disable using SSBOs for lights but not disable the feature entirely.
|
||||
// Note that using an uniform buffer here will limit the number of lights per surface so it isn't done for NVidia and AMD.
|
||||
if (screen->IsVulkan() || ((screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && !strstr(screen->gl_vendorstring, "Intel")))
|
||||
if (screen->IsVulkan() || ((screen->hwcaps & RFL_SHADER_STORAGE_BUFFER) && !strstr(screen->vendorstring, "Intel")))
|
||||
{
|
||||
mBufferType = true;
|
||||
mBlockAlign = 0;
|
||||
|
|
|
@ -128,7 +128,14 @@ void VulkanFrameBuffer::InitializeState()
|
|||
first = false;
|
||||
}
|
||||
|
||||
gl_vendorstring = "Vulkan";
|
||||
switch (device->PhysicalDevice.Properties.vendorID)
|
||||
{
|
||||
case 0x1002: vendorstring = "AMD"; break;
|
||||
case 0x10DE: vendorstring = "NVIDIA"; break;
|
||||
case 0x8086: vendorstring = "Intel"; break;
|
||||
default: vendorstring = "Unknown"; break;
|
||||
}
|
||||
|
||||
hwcaps = RFL_SHADER_STORAGE_BUFFER | RFL_BUFFER_STORAGE;
|
||||
glslversion = 4.50f;
|
||||
uniformblockalignment = (unsigned int)device->PhysicalDevice.Properties.limits.minUniformBufferOffsetAlignment;
|
||||
|
|
|
@ -375,7 +375,7 @@ public:
|
|||
int stencilValue = 0; // Global stencil test value
|
||||
unsigned int uniformblockalignment = 256; // Hardware dependent uniform buffer alignment.
|
||||
unsigned int maxuniformblock = 65536;
|
||||
const char *gl_vendorstring; // On OpenGL (not Vulkan) we have to account for some issues with Intel.
|
||||
const char *vendorstring; // We have to account for some issues with particular vendors.
|
||||
FPortalSceneState *mPortalState; // global portal state.
|
||||
FSkyVertexBuffer *mSkyData = nullptr; // the sky vertex buffer
|
||||
FFlatVertexBuffer *mVertexData = nullptr; // Global vertex data
|
||||
|
|
Loading…
Reference in a new issue