VirtualBox

Changeset 78384 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
May 6, 2019 10:09:57 AM (6 years ago)
Author:
vboxsync
Message:

Additions/common/crOpenGL/feedback: Need to wrap the crState* calls as they take an additional parameter for the state tracker instance and are not compatible with the OpenGL interface anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/feedback/feedback.py

    r78375 r78384  
    3333                print('\tfeedback_spu.super.%s(%s);' % ( func_name, apiutil.MakeCallString(params) ))
    3434                print('}')
     35                print('')
     36                print('static %s FEEDBACKSPU_APIENTRY feedbackspu_FeedbackWrap%s(%s)' % ( return_type, func_name, apiutil.MakeDeclarationString(params) ))
     37                print('{')
     38                if len(params) == 0:
     39                        print('\tcrStateFeedback%s(&feedback_spu.StateTracker);' % ( func_name, ))
     40                else:
     41                        print('\tcrStateFeedback%s(&feedback_spu.StateTracker, %s);' % ( func_name, apiutil.MakeCallString(params) ))
     42                print('}')
     43        if apiutil.FindSpecial( "select", func_name ):
     44                print('static %s FEEDBACKSPU_APIENTRY feedbackspu_SelectWrap%s(%s)' % ( return_type, func_name, apiutil.MakeDeclarationString(params) ))
     45                print('{')
     46                if len(params) == 0:
     47                        print('\tcrStateSelect%s(&feedback_spu.StateTracker);' % ( func_name, ))
     48                else:
     49                        print('\tcrStateSelect%s(&feedback_spu.StateTracker, %s);' % ( func_name, apiutil.MakeCallString(params) ))
     50                print('}')
    3551
    3652
     
    3854print("""
    3955#define CHANGE(name, func) crSPUChangeInterface((void *)&(feedback_spu.self), (void *)feedback_spu.self.name, (void *)((SPUGenericFunction) func))
    40 #define CHANGESWAP(name, swapfunc, regfunc) crSPUChangeInterface( (void *)&(feedback_spu.self), (void *)feedback_spu.self.name, (void *)((SPUGenericFunction) (feedback_spu.swap ? swapfunc: regfunc )))
    4156
    4257static void __loadFeedbackAPI( void )
     
    4762        params = apiutil.Parameters(func_name)
    4863        if apiutil.FindSpecial( "feedback", func_name ):
    49                 print('\tCHANGE(%s, crStateFeedback%s);' % (func_name, func_name ))
     64                print('\tCHANGE(%s, feedbackspu_FeedbackWrap%s);' % (func_name, func_name ))
    5065print("""
    5166}
     
    5671for func_name in keys:
    5772        if apiutil.FindSpecial( "select", func_name ):
    58                 print('\tCHANGE(%s, crStateSelect%s);' % (func_name, func_name ))
     73                print('\tCHANGE(%s, feedbackspu_SelectWrap%s);' % (func_name, func_name ))
    5974        elif apiutil.FindSpecial( "feedback", func_name ):
    6075                print('\tCHANGE(%s, feedbackspu_%s);' % (func_name, func_name ))
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