diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de171b355..40c8bcb25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,14 +23,11 @@ jobs: restore-keys: "${{ runner.os }}-gradle-" - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4.2.0 + uses: gradle/actions/setup-gradle@v4 with: gradle-home-cache-cleanup: true cache-read-only: ${{ !endsWith(github.ref_name, '/dev') }} - - name: Validate Gradle Wrapper Integrity - uses: gradle/wrapper-validation-action@v2 - - name: Build # Doesn't actually publish, as no secrets are passed in, just makes sure that publishing works # Also generate the mod jars for the test job diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/gl/Driver.java b/common/src/backend/java/dev/engine_room/flywheel/backend/gl/Driver.java index 976c7eaf9..94f799d65 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/gl/Driver.java +++ b/common/src/backend/java/dev/engine_room/flywheel/backend/gl/Driver.java @@ -5,5 +5,5 @@ public enum Driver { AMD, INTEL, MESA, - UNKNOWN, + UNKNOWN; } diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/gl/GlCompat.java b/common/src/backend/java/dev/engine_room/flywheel/backend/gl/GlCompat.java index 742b8770c..fb70c6f64 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/gl/GlCompat.java +++ b/common/src/backend/java/dev/engine_room/flywheel/backend/gl/GlCompat.java @@ -140,7 +140,7 @@ private static int subgroupSize() { } private static boolean isInstancingSupported() { - if (CAPABILITIES == null) { + if (CAPABILITIES == null || isIntelHDGraphics()) { return false; } if (CAPABILITIES.OpenGL33) { @@ -150,7 +150,7 @@ private static boolean isInstancingSupported() { } private static boolean isIndirectSupported() { - if (CAPABILITIES == null) { + if (CAPABILITIES == null || isIntelHDGraphics()) { return false; } if (CAPABILITIES.OpenGL46) { @@ -215,4 +215,12 @@ void main() {} return success; } + + // Intel HD Graphics support* instancing and indirect rendering. + // * However, in reality the support is horrible and doesn't actually work + // so whenever we encounter these, we have to fall back to flywheel:off + public static boolean isIntelHDGraphics() { + String vendor = GL20C.glGetString(GL20C.GL_VENDOR); + return vendor != null && vendor.contains("Intel(R) HD Graphics"); + } }