VirtualBox

Changeset 26407 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Feb 10, 2010 12:10:01 PM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: fix host gpu crashes when running realflight3d g4 demo in guest

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/include/state/cr_limits.h

    r24783 r26407  
    2323
    2424
    25 #define CR_MAX_TEXTURE_UNITS            8
     25#define CR_MAX_TEXTURE_UNITS            16
    2626#define CR_MAX_GENERAL_COMBINERS        8
    2727#define CR_MAX_TEXTURE_SIZE             8192
     
    7070#define CR_MAX_FRAGMENT_PROGRAM_INSTRUCTIONS       72
    7171#define CR_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMS       24
    72 #define CR_MAX_FRAGMENT_PROGRAM_ENV_PARAMS         24
     72#define CR_MAX_FRAGMENT_PROGRAM_ENV_PARAMS         256
    7373#define CR_MAX_FRAGMENT_PROGRAM_TEMPS              16
    7474#define CR_MAX_FRAGMENT_PROGRAM_ATTRIBS            10
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_buffer.c

    r23694 r26407  
    492492            if (g->framebufferobject.drawFB)
    493493            {
    494                 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glDrawBuffer invalud mode while fbo is active");
     494                crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glDrawBuffer invalid mode while fbo is active");
    495495                return;
    496496            }
     
    501501                if (!g->framebufferobject.drawFB)
    502502                {
    503                     crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glDrawBuffer invalud mode while fbo is inactive");
     503                    crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glDrawBuffer invalid mode while fbo is inactive");
    504504                    return;
    505505                }
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c

    r25303 r26407  
    250250    for (i = 0; i < CR_MAX_VERTEX_ATTRIBS; i++) {
    251251        c->array.a[i].enabled = GL_FALSE;
    252         c->array.a[i].type = 0;
    253         c->array.a[i].size = 0;
     252        c->array.a[i].type = GL_FLOAT;
     253        c->array.a[i].size = 4;
    254254        c->array.a[i].stride = 0;
    255255#ifdef CR_ARB_vertex_buffer_object
     
    17981798        for (i = 0; (unsigned int)i < toCtx->limits.maxVertexProgramAttribs; i++) {
    17991799            if (from->array.a[i].enabled != to->array.a[i].enabled) {
    1800                 able[to->array.a[i].enabled](GL_VERTEX_ATTRIB_ARRAY0_NV + i);
     1800                if (to->array.a[i].enabled)
     1801                    diff_api.EnableVertexAttribArrayARB(i);
     1802                else
     1803                    diff_api.DisableVertexAttribArrayARB(i);
    18011804                from->array.a[i].enabled = to->array.a[i].enabled;
    18021805            }
     
    19821985        for (i = 0; (unsigned int)i < toCtx->limits.maxVertexProgramAttribs; i++) {
    19831986            if (from->array.a[i].enabled != to->array.a[i].enabled) {
    1984                 able[to->array.a[i].enabled](GL_VERTEX_ATTRIB_ARRAY0_NV + i);
     1987                if (to->array.a[i].enabled)
     1988                    diff_api.EnableVertexAttribArrayARB(i);
     1989                else
     1990                    diff_api.DisableVertexAttribArrayARB(i);
    19851991                FILLDIRTY(cb->enableClientState);
    19861992            }
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