VirtualBox

Changeset 73518 in vbox for trunk/src


Ignore:
Timestamp:
Aug 6, 2018 10:51:44 AM (6 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA3d-ogl: shaderlib: allow more float constants.

File:
1 edited

Legend:

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

    r69500 r73518  
    333333    }
    334334
     335    /* Tweak the float constants limit to use a greater number of constants.
     336     * Keep some space for the internal usage.
     337     * The shader creation code artificially sets the limit according to D3D shader version.
     338     * But the guest may use more constants and we are not required to strictly follow D3D specs.
     339     */
     340    object->baseShader.limits.constant_float = RT_MAX(g_adapter.gl_info.limits.glsl_vs_float_constants / 2,
     341                                                      object->baseShader.limits.constant_float);
     342
    335343#ifdef VBOX_WINE_WITH_SHADER_CACHE
    336344    object = vertexshader_check_cached(This, object);
     
    366374        return VERR_INTERNAL_ERROR;
    367375    }
     376
     377    /* Tweak the float constants limit to use a greater number of constants.
     378     * Keep some space for the internal usage.
     379     * The shader creation code artificially sets the limit according to D3D shader version.
     380     * But the guest may use more constants and we are not required to strictly follow D3D specs.
     381     */
     382    object->baseShader.limits.constant_float = RT_MAX(g_adapter.gl_info.limits.glsl_ps_float_constants / 2,
     383                                                      object->baseShader.limits.constant_float);
    368384
    369385#ifdef VBOX_WINE_WITH_SHADER_CACHE
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