Reserve a graphics restriction for hardware skinning

This commit is contained in:
Benau 2017-10-20 14:00:38 +08:00
parent fd0eaf064f
commit 1b70144c80
3 changed files with 46 additions and 32 deletions

View File

@ -246,6 +246,11 @@ void CentralVideoSettings::init()
hasSRGBFramebuffer = false;
}
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_HARDWARE_SKINNING))
{
Log::info("GLDriver", "Hardware Skinning enabled, method: %s",
isARBShaderStorageBufferObjectUsable() ? "SSBO" : "TBO");
}
#else
if (m_glsl == true)
{
@ -286,6 +291,10 @@ void CentralVideoSettings::init()
{
m_need_vertex_id_workaround = true;
}
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_HARDWARE_SKINNING))
{
Log::info("GLDriver", "Hardware Skinning enabled, method: 1024 * 16 RGBA float texture");
}
#endif
// Only unset the high def textures if they are set as default. If the
@ -527,7 +536,7 @@ bool CentralVideoSettings::isDefferedEnabled() const
bool CentralVideoSettings::supportsHardwareSkinning() const
{
return true;
return !GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_HARDWARE_SKINNING);
}
bool CentralVideoSettings::isARBTextureSwizzleUsable() const

View File

@ -44,37 +44,41 @@ namespace GraphicsRestrictions
/** The list of names used in the XML file for the graphics
* restriction types. They must be in the same order as the types. */
std::array<std::string, 30> m_names_of_restrictions = {
"UniformBufferObject",
"GeometryShader",
"DrawIndirect",
"TextureView",
"TextureStorage",
"ImageLoadStore",
"BaseInstance",
"ComputeShader",
"ArraysOfArrays",
"ShaderStorageBufferObject",
"MultiDrawIndirect",
"ShaderAtomicCounters",
"BufferStorage",
"BindlessTexture",
"TextureCompressionS3TC",
"AMDVertexShaderLayer",
"ExplicitAttribLocation",
"TextureFilterAnisotropic",
"TextureFormatBGRA8888",
"ColorBufferFloat",
"DriverRecentEnough",
"HighDefinitionTextures",
"HighDefinitionTextures256",
"AdvancedPipeline",
"FramebufferSRGB",
"FramebufferSRGBWorkaround1",
"FramebufferSRGBWorkaround2",
"GI",
"ForceLegacyDevice",
"VertexIdWorking"
std::array<std::string, 31> m_names_of_restrictions =
{
{
"UniformBufferObject",
"GeometryShader",
"DrawIndirect",
"TextureView",
"TextureStorage",
"ImageLoadStore",
"BaseInstance",
"ComputeShader",
"ArraysOfArrays",
"ShaderStorageBufferObject",
"MultiDrawIndirect",
"ShaderAtomicCounters",
"BufferStorage",
"BindlessTexture",
"TextureCompressionS3TC",
"AMDVertexShaderLayer",
"ExplicitAttribLocation",
"TextureFilterAnisotropic",
"TextureFormatBGRA8888",
"ColorBufferFloat",
"DriverRecentEnough",
"HighDefinitionTextures",
"HighDefinitionTextures256",
"AdvancedPipeline",
"FramebufferSRGB",
"FramebufferSRGBWorkaround1",
"FramebufferSRGBWorkaround2",
"GI",
"ForceLegacyDevice",
"VertexIdWorking",
"HardwareSkinning"
}
};
} // namespace Private
using namespace Private;

View File

@ -64,6 +64,7 @@ namespace GraphicsRestrictions
GR_GI,
GR_FORCE_LEGACY_DEVICE,
GR_VERTEX_ID_WORKING,
GR_HARDWARE_SKINNING,
GR_COUNT /** MUST be last entry. */
} ;