VirtualBox

Ignore:
Timestamp:
Jun 24, 2013 2:30:18 PM (11 years ago)
Author:
vboxsync
Message:

wddm/crOpenGL: r0-based visible regions handling, r0-based chromium commands submission debugged, more on new presentation mechanism, cleanup, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_misc.c

    r33475 r46757  
    88#include "cr_error.h"
    99
    10 void PACK_APIENTRY crPackChromiumParametervCR(GLenum target, GLenum type, GLsizei count, const GLvoid *values)
     10void PACK_APIENTRY crPackChromiumParametervCR(CR_PACKER_CONTEXT_ARGDECL GLenum target, GLenum type, GLsizei count, const GLvoid *values)
    1111{
    1212    CR_GET_PACKER_CONTEXT(pc);
     
    3030        params_length = sizeof(GLint) * count;
    3131        break;
     32#ifndef IN_RING0
    3233    case GL_FLOAT:
    3334        params_length = sizeof(GLfloat) * count;
    3435        break;
     36#endif
    3537#if 0
    3638    case GL_DOUBLE:
     
    7577        }
    7678        break;
     79#ifndef IN_RING0
    7780    case GL_FLOAT:
    7881        for (i = 0; i < count; i++, pos += sizeof(GLfloat)) {
     
    8083        }
    8184        break;
     85#endif
    8286#if 0
    8387    case GL_DOUBLE:
     
    96100}
    97101
    98 void PACK_APIENTRY crPackDeleteQueriesARB(GLsizei n, const GLuint * ids)
     102#ifndef IN_RING0
     103void PACK_APIENTRY crPackDeleteQueriesARB(CR_PACKER_CONTEXT_ARGDECL GLsizei n, const GLuint * ids)
    99104{
    100105    unsigned char *data_ptr;
     
    108113    crPackFree(data_ptr);
    109114}
     115#endif
     116
     117void PACK_APIENTRY crPackVBoxTexPresent( CR_PACKER_CONTEXT_ARGDECL GLuint texture, GLuint cfg, GLint xPos, GLint yPos, GLint cRects, const GLint * pRects )
     118{
     119    GLint i, size, cnt;
     120
     121    CR_GET_PACKER_CONTEXT(pc);
     122    unsigned char *data_ptr;
     123    (void) pc;
     124    size = 28 + cRects * 4 * sizeof(GLint);
     125    CR_GET_BUFFERED_POINTER( pc, size );
     126    WRITE_DATA( 0, GLint, size );
     127    WRITE_DATA( 4, GLenum, CR_VBOXTEXPRESENT_EXTEND_OPCODE );
     128    WRITE_DATA( 8, GLint, texture );
     129    WRITE_DATA( 12, GLint, cfg );
     130    WRITE_DATA( 16, GLint, xPos );
     131    WRITE_DATA( 20, GLint, yPos );
     132    WRITE_DATA( 24, GLint, cRects );
     133
     134    cnt = 28;
     135    for (i=0; i<cRects; ++i)
     136    {
     137        WRITE_DATA(cnt, GLint, (GLint) pRects[4*i+0]);
     138        WRITE_DATA(cnt+4, GLint, (GLint) pRects[4*i+1]);
     139        WRITE_DATA(cnt+8, GLint, (GLint) pRects[4*i+2]);
     140        WRITE_DATA(cnt+12, GLint, (GLint) pRects[4*i+3]);
     141        cnt += 16;
     142    }
     143    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     144    CR_UNLOCK_PACKER_CONTEXT(pc);
     145}
     146
     147void PACK_APIENTRY crPackWindowPosition( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint x, GLint y )
     148{
     149    CR_GET_PACKER_CONTEXT(pc);
     150    unsigned char *data_ptr;
     151    (void) pc;
     152    CR_GET_BUFFERED_POINTER( pc, 20 );
     153    WRITE_DATA( 0, GLint, 20 );
     154    WRITE_DATA( 4, GLenum, CR_WINDOWPOSITION_EXTEND_OPCODE );
     155    WRITE_DATA( 8, GLint, window );
     156    WRITE_DATA( 12, GLint, x );
     157    WRITE_DATA( 16, GLint, y );
     158    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     159    CR_UNLOCK_PACKER_CONTEXT(pc);
     160}
     161
     162void PACK_APIENTRY crPackWindowShow( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint flag )
     163{
     164    CR_GET_PACKER_CONTEXT(pc);
     165    unsigned char *data_ptr;
     166    (void) pc;
     167    CR_GET_BUFFERED_POINTER( pc, 16 );
     168    WRITE_DATA( 0, GLint, 16 );
     169    WRITE_DATA( 4, GLenum, CR_WINDOWSHOW_EXTEND_OPCODE );
     170    WRITE_DATA( 8, GLint, window );
     171    WRITE_DATA( 12, GLint, flag );
     172    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     173    CR_UNLOCK_PACKER_CONTEXT(pc);
     174}
     175
     176void PACK_APIENTRY crPackWindowSize( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint w, GLint h )
     177{
     178    CR_GET_PACKER_CONTEXT(pc);
     179    unsigned char *data_ptr;
     180    (void) pc;
     181    CR_GET_BUFFERED_POINTER( pc, 20 );
     182    WRITE_DATA( 0, GLint, 20 );
     183    WRITE_DATA( 4, GLenum, CR_WINDOWSIZE_EXTEND_OPCODE );
     184    WRITE_DATA( 8, GLint, window );
     185    WRITE_DATA( 12, GLint, w );
     186    WRITE_DATA( 16, GLint, h );
     187    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     188    CR_UNLOCK_PACKER_CONTEXT(pc);
     189}
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