VirtualBox

Changeset 49264 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Oct 23, 2013 5:10:57 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90177
Message:

crOpenGL: dumping/logging

Location:
trunk/src/VBox/Additions/common/crOpenGL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk

    r46747 r49264  
    580580VBoxOGLpackspu_DEFS.win   += VBOX_WITH_CRHGSMI
    581581endif
     582ifdef VBOX_WITH_CRDUMPER
     583VBoxOGLpackspu_DEFS       += VBOX_WITH_CRDUMPER
     584endif
     585ifdef VBOX_WITH_CRPACKSPU_DUMPER
     586VBoxOGLpackspu_DEFS       += VBOX_WITH_CRPACKSPU_DUMPER
     587endif
    582588ifdef VBOX_WITH_WDDM
    583589VBoxOGLpackspu_DEFS.win   += VBOX_WITH_WDDM
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h

    r46059 r49264  
    2020#include "cr_threads.h"
    2121#include "state/cr_client.h"
     22#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     23# include "cr_dump.h"
     24#endif
    2225
    2326typedef struct thread_info_t ThreadInfo;
     
    6972#if defined(WINDOWS) && defined(VBOX_WITH_WDDM)
    7073    bool bRunningUnderWDDM;
     74#endif
     75
     76#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     77    SPUDispatchTable self;
     78
     79    CR_RECORDER Recorder;
     80    CR_DBGPRINT_DUMPER Dumper;
    7181#endif
    7282
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_glsl.c

    r45027 r49264  
    146146}
    147147
     148#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     149static void packspu_RecCheckInitRec()
     150{
     151    if (pack_spu.Recorder.pDumper)
     152        return;
     153
     154    crDmpDbgPrintInit(&pack_spu.Dumper);
     155
     156    crRecInit(&pack_spu.Recorder, NULL /*pBlitter: we do not support blitter operations here*/, &pack_spu.self, &pack_spu.Dumper.Base);
     157}
     158#endif
     159
    148160void PACKSPU_APIENTRY packspu_LinkProgram(GLuint program)
    149161{
     162#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     163    GLint linkStatus = 0;
     164#endif
     165
    150166    crStateLinkProgram(program);
    151167    crPackLinkProgram(program);
    152 }
     168
     169#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     170    pack_spu.self.GetObjectParameterivARB(program, GL_OBJECT_LINK_STATUS_ARB, &linkStatus);
     171    Assert(linkStatus);
     172    if (!linkStatus)
     173    {
     174        CRContext *ctx = crStateGetCurrent();
     175        packspu_RecCheckInitRec();
     176        crRecDumpProgram(&pack_spu.Recorder, ctx, program, program);
     177    }
     178#endif
     179}
     180
     181void PACKSPU_APIENTRY packspu_CompileShader(GLuint shader)
     182{
     183#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     184    GLint compileStatus = 0;
     185#endif
     186
     187//    crStateCompileShader(shader);
     188    crPackCompileShader(shader);
     189
     190#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     191    pack_spu.self.GetObjectParameterivARB(shader, GL_OBJECT_COMPILE_STATUS_ARB, &compileStatus);
     192    Assert(compileStatus);
     193    if (!compileStatus)
     194    {
     195        CRContext *ctx = crStateGetCurrent();
     196        packspu_RecCheckInitRec();
     197        crRecDumpShader(&pack_spu.Recorder, ctx, shader, shader);
     198    }
     199#endif
     200}
     201
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_init.c

    r42536 r49264  
    5151#endif
    5252
     53#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     54    memset(&pack_spu.Dumper, 0, sizeof (pack_spu.Dumper));
     55#endif
     56
    5357    if (!CRPACKSPU_IS_WDDM_CRHGSMI())
    5458    {
     
    7680packSPUSelfDispatch(SPUDispatchTable *self)
    7781{
     82#ifdef VBOX_WITH_CRPACKSPU_DUMPER
     83    crSPUInitDispatchTable( &(pack_spu.self) );
     84    crSPUCopyDispatchTable( &(pack_spu.self), self );
     85#else
    7886    (void)self;
     87#endif
    7988}
    8089
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special

    r48999 r49264  
    130130StringMarkerGREMEDY
    131131GenTextures
     132CompileShader
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette