- Timestamp:
- May 13, 2013 5:29:18 PM (12 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_version.h
r45616 r46037 31 31 #define SHCROGL_SSM_VERSION_WITH_SINGLE_DEPTH_STENCIL 36 32 32 #define SHCROGL_SSM_VERSION_WITH_PRESENT_STATE 37 33 #define SHCROGL_SSM_VERSION 37 33 /* older state did not have glPointParameter ( GL_POINT_SPRITE_COORD_ORIGIN ) implementation */ 34 #define SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN 38 35 /* dirty bits are not needed for now, remove */ 36 #define SHCROGL_SSM_VERSION_WITHOUT_DIRTY_BITS 38 37 #define SHCROGL_SSM_VERSION 38 34 38 35 39 /* These define the Chromium release number. -
trunk/src/VBox/GuestHost/OpenGL/include/state/cr_point.h
r15532 r46037 29 29 CRbitvalue coordReplacement[CR_MAX_TEXTURE_UNITS][CR_MAX_BITARRAY]; 30 30 #endif 31 CRbitvalue spriteCoordOrigin[CR_MAX_BITARRAY]; 31 32 CRbitvalue dirty[CR_MAX_BITARRAY]; 32 33 } CRPointBits; … … 44 45 GLboolean coordReplacement[CR_MAX_TEXTURE_UNITS]; 45 46 #endif 47 GLfloat spriteCoordOrigin; 48 GLfloat reserved; /* added to make sure alignment of sttructures following CRPointState in CRContext does not change */ 46 49 } CRPointState; 47 50 -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_bits_globalop.h
r44326 r46037 231 231 } 232 232 #endif 233 #if CRSTATE_BITS_OP_VERSION >= SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN 234 _CRSTATE_BITS_OP_SIZEOF(point.spriteCoordOrigin); 235 #endif 233 236 234 237 _CRSTATE_BITS_OP_SIZEOF(polygon.dirty); -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_buffer.c
r37613 r46037 484 484 { 485 485 case GL_NONE: 486 break; 486 487 case GL_FRONT_LEFT: 487 488 case GL_FRONT_RIGHT: … … 549 550 { 550 551 case GL_NONE: 552 break; 551 553 case GL_FRONT_LEFT: 552 554 case GL_FRONT_RIGHT: -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_get.txt
r44326 r46037 81 81 GLfloat GL_POINT_SIZE_MAX_ARB g->point.maxSize 82 82 GLfloat GL_POINT_FADE_THRESHOLD_SIZE_ARB g->point.fadeThresholdSize 83 GLfloat GL_POINT_SPRITE_COORD_ORIGIN g->point.spriteCoordOrigin 83 84 GLfloat GL_POINT_DISTANCE_ATTENUATION_ARB g->point.distanceAttenuation[0] g->point.distanceAttenuation[1] g->point.distanceAttenuation[2] 84 85 GLboolean GL_NORMALIZE g->transform.normalize -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_point.c
r15532 r46037 41 41 #endif 42 42 43 p->spriteCoordOrigin = (GLfloat)GL_UPPER_LEFT; 44 RESET(pb->spriteCoordOrigin, ctx->bitid); 45 43 46 RESET(pb->dirty, ctx->bitid); 44 47 … … 168 171 } 169 172 break; 173 case GL_POINT_SPRITE_COORD_ORIGIN: 174 { 175 GLenum enmVal = (GLenum)params[0]; 176 if (enmVal != GL_LOWER_LEFT && enmVal != GL_UPPER_LEFT) { 177 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, "glPointParameterfvARB invalid GL_POINT_SPRITE_COORD_ORIGIN value: %f", params[0]); 178 return; 179 } 180 p->spriteCoordOrigin = params[0]; 181 DIRTY(pb->spriteCoordOrigin, g->neg_bitid); 182 break; 183 } 170 184 default: 171 185 crStateError(__LINE__, __FILE__, GL_INVALID_ENUM, "glPointParameterfvARB invalid enum: %f", pname); -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_point.txt
r15532 r46037 8 8 :maxSize:maxSize:PointParameterfARB,GL_POINT_SIZE_MAX_ARB 9 9 :fadeThresholdSize:fadeThresholdSize:PointParameterfARB,GL_POINT_FADE_THRESHOLD_SIZE_ARB 10 :spriteCoordOrigin:spriteCoordOrigin:PointParameterfARB,GL_POINT_SPRITE_COORD_ORIGIN 10 11 #:distanceAttenuation:distanceAttenuation:PointParameterfvARB,GL_POINT_DISTANCE_ATTENUATION_ARB 11 12 -:distanceAttenuation:*if (from->distanceAttenuation[0] != to->distanceAttenuation[0] || from->distanceAttenuation[1] != to->distanceAttenuation[1] || from->distanceAttenuation[2] != to->distanceAttenuation[2]) { -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
r44937 r46037 149 149 SHCROGL_CUT_TAIL_ALIGNMENT(CRTextureUnit, SHCROGL_INTERNAL_LAST_FIELD); 150 150 #undef SHCROGL_INTERNAL_LAST_FIELD 151 return rc; 152 } 153 154 static int crStateLoadStencilPoint_v_37(CRPointState *pPoint, PSSMHANDLE pSSM) 155 { 156 int rc = VINF_SUCCESS; 157 SHCROGL_GET_STRUCT_HEAD(pPoint, CRPointState, spriteCoordOrigin); 158 pPoint->spriteCoordOrigin = (GLfloat)GL_UPPER_LEFT; 151 159 return rc; 152 160 } … … 1712 1720 int32_t crStateSaveGlobals(PSSMHANDLE pSSM) 1713 1721 { 1722 /* don't need that for now */ 1723 #if 0 1714 1724 CRStateBits *pBits; 1715 1725 int rc; … … 1725 1735 #include "state_bits_globalop.h" 1726 1736 #undef CRSTATE_BITS_OP 1737 #endif 1727 1738 return VINF_SUCCESS; 1728 1739 } … … 1754 1765 #undef CRSTATE_BITS_OP_STENCIL_OP_V_33 1755 1766 } 1767 else if (u32Version < SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN) 1768 { 1769 #define CRSTATE_BITS_OP_VERSION (SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN - 1) 1770 #include "state_bits_globalop.h" 1771 #undef CRSTATE_BITS_OP_VERSION 1772 } 1756 1773 else 1757 1774 { 1758 #include "state_bits_globalop.h" 1775 /* we do not put dirty bits to state anymore, 1776 * nop */ 1777 //#include "state_bits_globalop.h" 1759 1778 } 1760 1779 #undef CRSTATE_BITS_OP … … 1853 1872 AssertRCReturn(rc, rc); 1854 1873 SHCROGL_CUT_FIELD_ALIGNMENT(CRContext, attrib, buffer); 1855 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, stencil); 1874 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, point); 1875 rc = crStateLoadStencilPoint_v_37(&pTmpContext->point, pSSM); 1876 AssertRCReturn(rc, rc); 1877 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, polygon, stencil); 1856 1878 rc = crStateLoadStencilState_v_33(&pTmpContext->stencil, pSSM); 1857 1879 AssertRCReturn(rc, rc); … … 1868 1890 AssertRCReturn(rc, rc); 1869 1891 SHCROGL_CUT_FIELD_ALIGNMENT(CRContext, attrib, buffer); 1870 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, stencil); 1892 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, point); 1893 rc = crStateLoadStencilPoint_v_37(&pTmpContext->point, pSSM); 1894 AssertRCReturn(rc, rc); 1895 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, polygon, stencil); 1871 1896 rc = crStateLoadStencilState_v_33(&pTmpContext->stencil, pSSM); 1872 1897 AssertRCReturn(rc, rc); … … 1884 1909 AssertRCReturn(rc, rc); 1885 1910 SHCROGL_CUT_FIELD_ALIGNMENT(CRContext, attrib, buffer); 1886 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, stencil); 1911 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, buffer, point); 1912 rc = crStateLoadStencilPoint_v_37(&pTmpContext->point, pSSM); 1913 AssertRCReturn(rc, rc); 1914 SHCROGL_GET_STRUCT_PART(pTmpContext, CRContext, polygon, stencil); 1887 1915 rc = crStateLoadStencilState_v_33(&pTmpContext->stencil, pSSM); 1888 1916 AssertRCReturn(rc, rc); 1889 1917 SHCROGL_CUT_FOR_OLD_TYPE_TO_ENSURE_ALIGNMENT(CRContext, stencil, CRStencilState_v_33, sizeof (void*)); 1890 1918 SHCROGL_GET_STRUCT_TAIL(pTmpContext, CRContext, texture); 1919 } 1920 else if (u32Version < SHCROGL_SSM_VERSION_WITH_SPRITE_COORD_ORIGIN) 1921 { 1922 SHCROGL_GET_STRUCT_HEAD(pTmpContext, CRContext, point); 1923 crStateLoadStencilPoint_v_37(&pTmpContext->point, pSSM); 1924 SHCROGL_GET_STRUCT_TAIL(pTmpContext, CRContext, polygon); 1891 1925 } 1892 1926 else
Note:
See TracChangeset
for help on using the changeset viewer.