VirtualBox

Ignore:
Timestamp:
Apr 4, 2014 7:12:59 PM (11 years ago)
Author:
vboxsync
Message:

crOpenGL build fix take 2

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/Makefile.kmk

    r50974 r50975  
    5353endif
    5454VBoxSharedCrOpenGL_INTERMEDIATES = \
    55         $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES) \
    56         $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h
    57 
     55        $(TEMPLATE_VBOXMAINEXE_INTERMEDIATES)
    5856VBoxSharedCrOpenGL_INCS.win = \
    5957        $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC) \
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack.py

    r50973 r50975  
    205205    cr_unpackData = node->unpackData;
    206206    crFree( node );
     207}
     208
     209CR_UNPACK_BUFFER_TYPE crUnpackGetBufferType(const void *opcodes, unsigned int num_opcodes)
     210{
     211    const uint8_t *pu8Codes = (const uint8_t *)opcodes;
     212
     213    CR_UNPACK_BUFFER_TYPE enmType;
     214    uint8_t first;
     215    uint8_t last;
     216
     217    if (!num_opcodes)
     218        return CR_UNPACK_BUFFER_TYPE_GENERIC;
     219
     220    first = pu8Codes[0];
     221    last = pu8Codes[1-(int)num_opcodes];
     222
     223    enmType = (first != CR_CMDBLOCKBEGIN_OPCODE) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_BEGIN;
     224
     225    if (last != CR_CMDBLOCKEND_OPCODE)
     226        return enmType;
     227
     228    /* last is CMDBLOCKEND*/
     229    return (enmType == CR_UNPACK_BUFFER_TYPE_CMDBLOCK_BEGIN) ? CR_UNPACK_BUFFER_TYPE_GENERIC : CR_UNPACK_BUFFER_TYPE_CMDBLOCK_END;
    207230}
    208231
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