VirtualBox

Changeset 80515 in vbox for trunk/src


Ignore:
Timestamp:
Aug 30, 2019 3:48:57 PM (5 years ago)
Author:
vboxsync
Message:

Devices/Graphics/shaderlib: workaround for mac OS GL driver limits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/shaderlib/glsl_shader.c

    r69046 r80515  
    10731073        else
    10741074        {
     1075#ifndef VBOX_WITH_VMSVGA
    10751076            if(This->baseShader.reg_maps.usesrelconstF) {
     1077#else
     1078            /* If GL supports only 256 constants (seen on macOS drivers for compatibility profile, which we use),
     1079             * then ignore the need for potential uniforms and always declare VC[256].
     1080             * This allows to compile Windows 10 shader which use hardcoded constants at 250+ index range.
     1081             * Fixes drawing problems on Windows 10 desktop.
     1082             *
     1083             * This hack is normally active only on macOS, because Windows and Linux OpenGL drivers
     1084             * have a more usable limit for GL compatibility context (1024+).
     1085             */
     1086            if (This->baseShader.reg_maps.usesrelconstF && gl_info->limits.glsl_vs_float_constants > 256) {
     1087#endif
    10761088                /* Subtract the other potential uniforms from the max available (bools, ints, and 1 row of projection matrix).
    10771089                 * Subtract another uniform for immediate values, which have to be loaded via uniform by the driver as well.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette