VirtualBox

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


Ignore:
Timestamp:
Jan 26, 2010 2:21:26 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56961
Message:

crOpenGL: track bound textures on client side, add debug check for client side tracked states

Location:
trunk/src/VBox/Additions/common/crOpenGL/pack
Files:
3 edited

Legend:

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

    r21308 r26048  
    1616#include "cr_packfunctions.h"
    1717#include "cr_net.h"
     18#include "cr_mem.h"
    1819#include "packspu_proto.h"
    1920"""
     
    9596        || pname == GL_ACTIVE_TEXTURE_ARB
    9697#endif
     98        || pname == GL_TEXTURE_BINDING_1D
     99        || pname == GL_TEXTURE_BINDING_2D
     100#ifdef CR_NV_texture_rectangle
     101        || pname == GL_TEXTURE_BINDING_RECTANGLE_NV
     102#endif
     103#ifdef CR_ARB_texture_cube_map
     104        || pname == GL_TEXTURE_BINDING_CUBE_MAP_ARB
     105#endif
    97106        )
    98107        {
     108#ifndef DEBUG
    99109            crState%s( pname, params );
    100110            return;
     111#else
     112            %s localparams;
     113            localparams = (%s) crAlloc(__numValues(pname) * sizeof(*localparams));
     114            crState%s(pname, localparams);
     115            crPack%s(%s, &writeback);
     116            packspuFlush( (void *) thread );
     117            while (writeback)
     118                crNetRecv();
     119            for (i=0; i<__numValues(pname); ++i)
     120            {
     121                if (localparams[i] != params[i])
     122                {
     123                    crWarning("Incorrect local state in %s for %%x param %%i", pname, i);
     124                }
     125            }
     126            crFree(localparams);
     127            return;
     128#endif
     129           
    101130        }
    102             """ % func_name
     131            """ % (func_name, params[-1][1], params[-1][1], func_name, func_name, apiutil.MakeCallString(params), func_name)
    103132        params.append( ("&writeback", "foo", 0) )
    104133        print '\tif (pack_spu.swap)'
     
    113142        print '\twhile (writeback)'
    114143        print '\t\tcrNetRecv();'
     144
     145
     146
    115147        lastParamName = params[-2][0]
    116148        if return_type != 'void':
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special

    r23694 r26048  
    9494FramebufferRenderbufferEXT
    9595CheckFramebufferStatusEXT
     96BindTexture
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_texture.c

    r20509 r26048  
    3131    crPackActiveTextureARB(texture);
    3232}
     33
     34void PACKSPU_APIENTRY packspu_BindTexture(GLenum target, GLuint texture)
     35{
     36    crStateBindTexture(target, texture);
     37    crPackBindTexture(target, texture);
     38}
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