Browse Source

Shaders: SwiftShader, I DON'T LIKE YOU.

"Luckily", thanks to the DRAW_COUNT=1 and MATERIAL_COUNT=1 optimizations
not everything blows up, so i don't need to skip absolutely everything,
unfortunately Phong lights are affected by this insane crapfest as well
so basically nothing from Phong UBO support is tested there. FFS.
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
35aba9aa8e
  1. 10
      src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp
  2. 10
      src/Magnum/Shaders/Test/FlatGLTest.cpp
  3. 10
      src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp
  4. 60
      src/Magnum/Shaders/Test/PhongGLTest.cpp
  5. 10
      src/Magnum/Shaders/Test/VectorGLTest.cpp
  6. 10
      src/Magnum/Shaders/Test/VertexColorGLTest.cpp

10
src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp

@ -1071,6 +1071,11 @@ void DistanceFieldVectorGLTest::renderMulti2D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) ||
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found.");
@ -1267,6 +1272,11 @@ void DistanceFieldVectorGLTest::renderMulti3D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) ||
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found.");

10
src/Magnum/Shaders/Test/FlatGLTest.cpp

@ -3015,6 +3015,11 @@ void FlatGLTest::renderMulti2D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
FlatGL2D shader{FlatGL2D::Flag::UniformBuffers|FlatGL2D::Flag::ObjectId|data.flags, data.materialCount, data.drawCount}; FlatGL2D shader{FlatGL2D::Flag::UniformBuffers|FlatGL2D::Flag::ObjectId|data.flags, data.materialCount, data.drawCount};
GL::Texture2D texture{NoCreate}; GL::Texture2D texture{NoCreate};
@ -3307,6 +3312,11 @@ void FlatGLTest::renderMulti3D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
FlatGL3D shader{FlatGL3D::Flag::UniformBuffers|FlatGL3D::Flag::ObjectId|data.flags, data.materialCount, data.drawCount}; FlatGL3D shader{FlatGL3D::Flag::UniformBuffers|FlatGL3D::Flag::ObjectId|data.flags, data.materialCount, data.drawCount};
GL::Texture2D texture{NoCreate}; GL::Texture2D texture{NoCreate};

10
src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp

@ -3243,6 +3243,11 @@ void MeshVisualizerGLTest::renderMulti2D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
/* Circle is a fan, plane is a strip, make it indexed first */ /* Circle is a fan, plane is a strip, make it indexed first */
Trade::MeshData circleData = MeshTools::generateIndices(Primitives::circle2DSolid(8)); Trade::MeshData circleData = MeshTools::generateIndices(Primitives::circle2DSolid(8));
Trade::MeshData squareData = MeshTools::generateIndices(Primitives::squareSolid()); Trade::MeshData squareData = MeshTools::generateIndices(Primitives::squareSolid());
@ -3436,6 +3441,11 @@ void MeshVisualizerGLTest::renderMulti3D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
Trade::MeshData sphereData = MeshTools::interleave(Primitives::icosphereSolid(0), { Trade::MeshData sphereData = MeshTools::interleave(Primitives::icosphereSolid(0), {
/* The icosphere doesn't have tangents and we don't use them, but /* The icosphere doesn't have tangents and we don't use them, but
concatenate() will ignore the tangents of others if the first mesh concatenate() will ignore the tangents of others if the first mesh

60
src/Magnum/Shaders/Test/PhongGLTest.cpp

@ -1474,6 +1474,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderDefaults() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -1545,6 +1550,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderColored() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -1655,6 +1665,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderSinglePixelTextured() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -1837,6 +1852,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderTextured() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -2065,6 +2085,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderTexturedNormal() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -2253,6 +2278,11 @@ template<class T, PhongGL::Flag flag> void PhongGLTest::renderVertexColor() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} else } else
#endif #endif
{ {
@ -2376,6 +2406,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderShininess() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -2523,6 +2558,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderAlpha() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -2703,6 +2743,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderObjectId() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -2814,6 +2859,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderLights() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -3173,6 +3223,11 @@ template<PhongGL::Flag flag> void PhongGLTest::renderInstanced() {
if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>()) if(!GL::Context::current().isExtensionSupported<GL::Extensions::ARB::uniform_buffer_object>())
CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported."); CORRADE_SKIP(GL::Extensions::ARB::uniform_buffer_object::string() << "is not supported.");
#endif #endif
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed (light) arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
} }
#endif #endif
@ -3553,6 +3608,11 @@ void PhongGLTest::renderMulti() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
PhongGL shader{PhongGL::Flag::UniformBuffers|PhongGL::Flag::ObjectId|data.flags, data.lightCount, data.materialCount, data.drawCount}; PhongGL shader{PhongGL::Flag::UniformBuffers|PhongGL::Flag::ObjectId|data.flags, data.lightCount, data.materialCount, data.drawCount};
GL::Texture2D diffuse{NoCreate}; GL::Texture2D diffuse{NoCreate};

10
src/Magnum/Shaders/Test/VectorGLTest.cpp

@ -1036,6 +1036,11 @@ void VectorGLTest::renderMulti2D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) ||
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found.");
@ -1232,6 +1237,11 @@ void VectorGLTest::renderMulti3D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) || if(!(_manager.loadState("AnyImageImporter") & PluginManager::LoadState::Loaded) ||
!(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded)) !(_manager.loadState("TgaImporter") & PluginManager::LoadState::Loaded))
CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found."); CORRADE_SKIP("AnyImageImporter / TgaImporter plugins not found.");

10
src/Magnum/Shaders/Test/VertexColorGLTest.cpp

@ -793,6 +793,11 @@ void VertexColorGLTest::renderMulti2D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
/* Circle is a fan, plane is a strip, make it indexed first */ /* Circle is a fan, plane is a strip, make it indexed first */
Trade::MeshData circleData = MeshTools::generateIndices(Primitives::circle2DSolid(32)); Trade::MeshData circleData = MeshTools::generateIndices(Primitives::circle2DSolid(32));
Trade::MeshData squareData = MeshTools::generateIndices(Primitives::squareSolid()); Trade::MeshData squareData = MeshTools::generateIndices(Primitives::squareSolid());
@ -916,6 +921,11 @@ void VertexColorGLTest::renderMulti3D() {
#endif #endif
} }
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_WEBGL)
if(GL::Context::current().detectedDriver() & GL::Context::DetectedDriver::SwiftShader)
CORRADE_SKIP("UBOs with dynamically indexed arrays are a crashy dumpster fire on SwiftShader, can't test.");
#endif
Trade::MeshData sphereData = Primitives::uvSphereSolid(16, 32); Trade::MeshData sphereData = Primitives::uvSphereSolid(16, 32);
/* Plane is a strip, make it indexed first */ /* Plane is a strip, make it indexed first */
Trade::MeshData planeData = MeshTools::generateIndices(Primitives::planeSolid()); Trade::MeshData planeData = MeshTools::generateIndices(Primitives::planeSolid());

Loading…
Cancel
Save