VirtualBox

Changeset 55762 in vbox


Ignore:
Timestamp:
May 8, 2015 6:05:43 PM (9 years ago)
Author:
vboxsync
Message:

Host 3D: DLM: dump local stuff (preparing for saving Display Lists).

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk

    r54905 r55762  
    101101ifdef VBOX_WITH_CRHGSMI
    102102VBoxSharedCrOpenGL_DEFS += VBOX_WITH_CRHGSMI
     103endif
     104ifdef VBOX_WITH_CR_DISPLAY_LISTS
     105VBoxSharedCrOpenGL_LIBS += $(PATH_STAGE_LIB)/VBoxOGLcrdlm$(VBOX_SUFF_LIB)
    103106endif
    104107
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r55761 r55762  
    1616#include "cr_environment.h"
    1717#include "cr_pixeldata.h"
     18
     19#ifdef VBOX_WITH_CR_DISPLAY_LISTS
     20# include "cr_dlm.h"
     21#endif
     22
    1823#include "server_dispatch.h"
    1924#include "state/cr_texture.h"
     
    16711676        }
    16721677    }
     1678
     1679#ifdef VBOX_WITH_CR_DISPLAY_LISTS
     1680    rc = crDLMSaveState();
     1681    AssertRCReturn(rc, rc);
     1682#endif
    16731683
    16741684    rc = crServerPendSaveState(pSSM);
  • trunk/src/VBox/HostServices/SharedOpenGL/dlm/dlm.c

    r55012 r55762  
    733733                (*ErrorCallback)(line, file, error, info);
    734734}
     735
     736int32_t DLM_APIENTRY crDLMSaveState(void)
     737{
     738    return 0;
     739}
  • trunk/src/VBox/HostServices/SharedOpenGL/dlm/dlm_generated.py

    r54905 r55762  
    8585        print ' DLMInstanceList *next;'
    8686        print ' DLMInstanceList *stateNext;'
     87        print ' int cbInstance;'
    8788        print ' void (DLM_APIENTRY *execute)(DLMInstanceList *instance, SPUDispatchTable *dispatchTable);'
    8889        for (name, type, vecSize) in params:
     
    286287        print ' CRDLMContextState *state = CURRENT_STATE();'
    287288        print ' struct instance%s *instance;' % (functionName)
    288 
     289       
    289290        # The calling SPU is supposed to verify that the element is supposed to be
    290291        # compiled before it is actually compiled; typically, this is done based
     
    318319                        name = params[index][0]
    319320                        print '\tinstance->%s = %s;' % (name, name)
    320 
     321       
     322        # We need to know instance size in bytes in order to save its state later.
     323        print '\tinstance->cbInstance = sizeof(struct instance%s);' % functionName
     324       
    321325        # If there's a pointer parameter, apply it.
    322326        if len(pointers) == 1:
     
    328332                print '\t}'
    329333                if pointersize == 'special':
    330                         print '\t(void) crdlm_pointers_%s(instance, %s);' % (functionName, callstring)
     334                        print '\tinstance->cbInstance += crdlm_pointers_%s(instance, %s);' % (functionName, callstring)
    331335                else:
    332336                        print '\tcrMemcpy((void *)instance->%s, (void *) %s, %s*sizeof(%s));' % (params[pointers[0]][0], params[pointers[0]][0], pointersize, pointertype)
    333337        elif len(pointers) == 2:
    334338                # this seems to work
    335                 print '\t(void) crdlm_pointers_%s(instance, %s);' % (functionName, callstring)
     339                print '\tinstance->cbInstance += crdlm_pointers_%s(instance, %s);' % (functionName, callstring)
    336340        elif len(pointers) > 2:
    337341                print "#error don't know how to handle pointer parameters for %s" % (functionName)
    338 
     342       
    339343        # Add the element to the current display list
    340344        AddInstanceToList('\t')
  • trunk/src/VBox/HostServices/SharedOpenGL/dlm/dlm_header.py

    r54905 r55762  
    5252        ('GLuint DLM_APIENTRY', 'crDLMGenLists', 'GLsizei range'),
    5353        ('void DLM_APIENTRY', 'crDLMListBase', 'GLuint base'),
     54        ('int32_t DLM_APIENTRY', 'crDLMSaveState', 'void'),
    5455        #('void DLM_APIENTRY', 'crDLMListSent', 'CRDLM *dlm, unsigned long listIdentifier'),
    5556        #('GLboolean DLM_APIENTRY', 'crDLMIsListSent', 'CRDLM *dlm, unsigned long listIdentifier'),
     
    9596        struct DLMInstanceList *next;
    9697        struct DLMInstanceList *stateNext;
     98        int    cbInstance;
    9799        void (*execute)(struct DLMInstanceList *instance, SPUDispatchTable *dispatchTable);
    98100} DLMInstanceList;
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