VirtualBox

Ignore:
Timestamp:
Nov 20, 2018 2:44:39 PM (6 years ago)
Author:
vboxsync
Message:

Additions/3D/win: ICD forwarder dll 32 bit fixes. bugref:9296

Location:
trunk/src/VBox/Additions/3D/win/VBoxICD
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/3D/win/VBoxICD/Makefile.kmk

    r75562 r75621  
    2020
    2121VBOX_PATH_GL_GEN = $(PATH_OBJ)/VBoxGLgen
    22 VBOX_GL_ICD_DEF_FILE = $(VBOX_PATH_MESA)/src/gallium/state_trackers/wgl/opengl32.def
     22VBOX_GL_ICD_DEF_FILE = $(VBOX_PATH_MESA)/src/gallium/state_trackers/wgl/opengl32.mingw.def
    2323
    2424BLDDIRS += $(VBOX_PATH_GL_GEN)/
     
    3535
    3636VBoxICD_SOURCES     = \
    37         $(VBOX_GL_ICD_DEF_FILE) \
     37        $(VBOX_PATH_MESA)/src/gallium/state_trackers/wgl/opengl32.def \
    3838        $(VBOX_PATH_GL_GEN)/forwarders.asm \
    3939        $(VBOX_PATH_GL_GEN)/pfns.c \
  • trunk/src/VBox/Additions/3D/win/VBoxICD/icd_forwarders.py

    r75562 r75621  
    2222
    2323    names = []
     24    cbArgs = []
    2425    for line in exports_file.readlines():
    2526        line = line.strip()
    2627        if len(line) > 0 and line[0] != ';' and line != 'EXPORTS':
    27             names.append(line)
     28            # Parse 'glAccum = glAccum@8'
     29            words = line.split('=', 1)
     30
     31            # Function name
     32            names.append(words[0].strip())
     33
     34            # Size of arguments in bytes
     35            words = words[1].split('@')
     36            cbArgs.append(words[1].strip())
    2837
    2938    exports_file.close()
     
    4049    asm_file.write('%include "iprt/asmdefs.mac"\n')
    4150    asm_file.write('\n')
    42     asm_file.write(';;;; %define ICD_LAZY_LOAD ; Enable this to lazy load the ICD DLL (does not work on Win64)\n')
     51    asm_file.write(';;;; Enable ICD_LAZY_LOAD to lazy load the ICD DLL (does not work on Win64)\n')
     52    asm_file.write('; %define ICD_LAZY_LOAD 1\n')
    4353    asm_file.write('\n')
    4454    asm_file.write('%ifdef RT_ARCH_AMD64\n')
     
    5565    for index in range(len(names)):
    5666        fn = names[index]
     67        cbRet = cbArgs[index]
    5768        asm_file.write('\n')
    5869        asm_file.write('BEGINPROC_EXPORTED %s\n' % fn)
     
    7182        asm_file.write('    or    xAX, xAX\n')
    7283        asm_file.write('    jnz   l_jmp_to_%s\n' % fn)
     84        asm_file.write('%ifdef RT_ARCH_AMD64\n')
    7385        asm_file.write('    ret\n')
     86        asm_file.write('%else ; X86\n')
     87        asm_file.write('    ret %s\n' % cbRet)
     88        asm_file.write('%endif\n')
    7489        asm_file.write('l_jmp_to_%s:\n' % fn)
    7590        asm_file.write('    jmp   xAX\n')
  • trunk/src/VBox/Additions/3D/win/VBoxICD/icd_pfns.py

    r75562 r75621  
    2525        line = line.strip()
    2626        if len(line) > 0 and line[0] != ';' and line != 'EXPORTS':
    27             names.append(line)
     27            # Parse 'glAccum = glAccum@8'
     28            words = line.split('=')
     29
     30            # Function name
     31            names.append(words[0].strip())
    2832
    2933    exports_file.close()
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