VirtualBox

Changeset 41418 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
May 23, 2012 2:44:06 PM (13 years ago)
Author:
vboxsync
Message:

wine & crOpenGL: backdoor logging for wine and enhancements for crOpenGL

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/Makefile.kmk

    r40388 r41418  
    187187  wined3dwddm_DEBUG_INSTTYPE.win = both
    188188 endif
    189 wined3dwddm_INCS           = vbox/libWineStub/include
     189wined3dwddm_INCS           = $(wined3d_INCS) \
     190                                $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
    190191wined3dwddm_DEFS           = $(subst VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT,,$(wined3d_DEFS))
    191192wined3dwddm_DEFS          += VBOX_WITH_WDDM VBOX_WINE_WITH_SINGLE_CONTEXT IN_VBOXLIBWINE
    192193wined3dwddm_SOURCES        = $(subst wined3d.def,wined3dwddm.def,$(wined3d_SOURCES)) vbox/VBoxDbgGl.c
     194wined3dwddm_LIBS          += $(wined3d_LIBS)\
     195                                $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
     196                                $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
    193197
    194198DLLS.amd64 += wined3dwddm-x86
    195 wined3dwddm-x86_EXTENDS    = wined3dwddm
     199wined3dwddm-x86_EXTENDS      = wined3dwddm
    196200wined3dwddm-x86_BLD_TRG_ARCH = x86
    197201# wined3d now using iprt/asm.h, which includes iprt/assert.h, so iprt is required
    198 wined3dwddm-x86_LIBS = \
    199                                                 $(VBOX_LIB_IPRT_GUEST_R3_X86) \
    200                                                 $(VBOX_LIB_VBGL_R3_X86)
    201 
     202wined3dwddm-x86_LIBS       = \
     203                                                        $(VBOX_LIB_IPRT_GUEST_R3_X86) \
     204                                                        $(VBOX_LIB_VBGL_R3_X86)
     205wined3dwddm-x86_LIBS      += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
     206                                $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
    202207wined3dwddm-x86_DEFS       = $(wined3dwddm_DEFS) VBOX_WDDM_WOW64
    203208endif # ifdef VBOX_WITH_WDDM
     
    297302  VBoxD3D9wddm_DEBUG_INSTTYPE = both
    298303 endif
    299 VBoxD3D9wddm_INCS           = vbox/libWineStub/include
     304VBoxD3D9wddm_INCS           = $(VBoxD3D9_INCS) \
     305                                $(PATH_ROOT)/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm
    300306VBoxD3D9wddm_DEFS          += $(VBoxD3D9_DEFS) VBOX_WITH_WDDM VBOX_WINE_WITHOUT_LIBWINE IN_VBOXWINEEX
    301307VBoxD3D9wddm_SOURCES        = $(subst d3d9xpdm.def,d3d9wddm.def,$(VBoxD3D9_SOURCES))
    302 VBoxD3D9wddm_LIBS           = $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS))
     308VBoxD3D9wddm_LIBS           = $(subst $(PATH_STAGE_LIB)/wined3d$(VBOX_SUFF_LIB),$(PATH_STAGE_LIB)/wined3dwddm$(VBOX_SUFF_LIB),$(VBoxD3D9_LIBS))
     309VBoxD3D9wddm_LIBS          += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger$(VBOX_SUFF_LIB) \
     310                                $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB)
    303311
    304312DLLS.amd64 += VBoxD3D9wddm-x86
     
    312320                                                $(VBOX_LIB_VBGL_R3_X86)
    313321 endif
     322VBoxD3D9wddm-x86_LIBS        += $(VBOX_PATH_ADDITIONS_LIB)/VBoxDispMpLogger-x86$(VBOX_SUFF_LIB) \
     323                                $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi-x86$(VBOX_SUFF_LIB)
    314324endif # ifdef VBOX_WITH_WDDM
    315325
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/vbox/libWineStub/debug.c

    r37216 r41418  
    4242//#include "wine/library.h"
    4343
     44#ifdef VBOX_WITH_WDDM
     45#include <VBoxDispMpLogger.h>
     46#include <iprt/err.h>
     47#else
     48#include <iprt/log.h>
     49#endif
     50
    4451static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" };
    4552
    4653#define MAX_DEBUG_OPTIONS 256
    4754
     55typedef DECLCALLBACK(void) FNVBOXWINELOGBACKDOOR(char* pcszStr);
     56typedef FNVBOXWINELOGBACKDOOR *PFNVBOXWINELOGBACKDOOR;
     57static PFNVBOXWINELOGBACKDOOR vbox_log_backdoor = NULL;
    4858static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME) | (1 << __WINE_DBCL_WARN);
    4959static int nb_debug_options = -1;
     
    193203}
    194204
     205#ifndef VBOX_WITH_WDDM
     206static DECLCALLBACK(void) vbox_log_backdoor_rt(char* pcszStr)
     207{
     208    RTLogBackdoorPrintf("%s", pcszStr);
     209}
     210#else
     211static DECLCALLBACK(void) vbox_log_backdoor_dispmp(char* pcszStr)
     212{
     213    VBoxDispMpLoggerLog(pcszStr);
     214}
     215#endif
     216static void vbox_log_v(const char *pszFormat, va_list args)
     217{
     218    if (vbox_log_backdoor)
     219    {
     220        static char buf[8092];
     221        int offset = sprintf(buf, "[0x%lx.0x%lx] Wine Debug: ", GetCurrentProcessId(), GetCurrentThreadId());
     222        vsprintf(buf + offset, pszFormat, args);
     223        vbox_log_backdoor(buf);
     224    }
     225}
    195226
    196227/* initialize all options at startup */
     
    203234    if ((wine_debug = getenv("WINEDEBUG")))
    204235    {
    205         if (!strcmp( wine_debug, "help" )) debug_usage();
     236        Assert(0);
     237        if (!strcmp( wine_debug, "help" ))
     238            debug_usage();
     239        else if (getenv("WINEDEBUG_BACKDOOR"))
     240        {
     241#ifdef VBOX_WITH_WDDM
     242            int rc = VBoxDispMpLoggerInit();
     243            if (RT_SUCCESS(rc))
     244                vbox_log_backdoor = vbox_log_backdoor_dispmp;
     245//            else
     246#else
     247                vbox_log_backdoor = vbox_log_backdoor_rt;
     248#endif
     249        }
    206250        parse_options( wine_debug );
    207251    }
     
    395439static int default_dbg_vprintf( const char *format, va_list args )
    396440{
     441    vbox_log_v(format, args);
    397442#ifdef DEBUG_leo
    398443    static FILE *output=NULL;
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