VirtualBox

Ignore:
Timestamp:
Jan 21, 2010 9:26:23 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: update to wine 1.1.36 and disable unnecessary fbo state poll

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/baseshader.c

    r23571 r25949  
    5656    /* WINED3DSIH_CND           */ "cnd",
    5757    /* WINED3DSIH_CRS           */ "crs",
     58    /* WINED3DSIH_CUT           */ "cut",
    5859    /* WINED3DSIH_DCL           */ "dcl",
    5960    /* WINED3DSIH_DEF           */ "def",
     
    6768    /* WINED3DSIH_DSY           */ "dsy",
    6869    /* WINED3DSIH_ELSE          */ "else",
     70    /* WINED3DSIH_EMIT          */ "emit",
    6971    /* WINED3DSIH_ENDIF         */ "endif",
    7072    /* WINED3DSIH_ENDLOOP       */ "endloop",
     
    7375    /* WINED3DSIH_EXPP          */ "expp",
    7476    /* WINED3DSIH_FRC           */ "frc",
     77    /* WINED3DSIH_IADD          */ "iadd",
    7578    /* WINED3DSIH_IF            */ "if",
    7679    /* WINED3DSIH_IFC           */ "ifc",
     80    /* WINED3DSIH_IGE           */ "ige",
    7781    /* WINED3DSIH_LABEL         */ "label",
    7882    /* WINED3DSIH_LIT           */ "lit",
     
    8185    /* WINED3DSIH_LOOP          */ "loop",
    8286    /* WINED3DSIH_LRP           */ "lrp",
     87    /* WINED3DSIH_LT            */ "lt",
    8388    /* WINED3DSIH_M3x2          */ "m3x2",
    8489    /* WINED3DSIH_M3x3          */ "m3x3",
     
    374379}
    375380
     381static const char *semantic_names[] =
     382{
     383    /* WINED3DDECLUSAGE_POSITION        */ "SV_POSITION",
     384    /* WINED3DDECLUSAGE_BLENDWEIGHT     */ "BLENDWEIGHT",
     385    /* WINED3DDECLUSAGE_BLENDINDICES    */ "BLENDINDICES",
     386    /* WINED3DDECLUSAGE_NORMAL          */ "NORMAL",
     387    /* WINED3DDECLUSAGE_PSIZE           */ "PSIZE",
     388    /* WINED3DDECLUSAGE_TEXCOORD        */ "TEXCOORD",
     389    /* WINED3DDECLUSAGE_TANGENT         */ "TANGENT",
     390    /* WINED3DDECLUSAGE_BINORMAL        */ "BINORMAL",
     391    /* WINED3DDECLUSAGE_TESSFACTOR      */ "TESSFACTOR",
     392    /* WINED3DDECLUSAGE_POSITIONT       */ "POSITIONT",
     393    /* WINED3DDECLUSAGE_COLOR           */ "COLOR",
     394    /* WINED3DDECLUSAGE_FOG             */ "FOG",
     395    /* WINED3DDECLUSAGE_DEPTH           */ "DEPTH",
     396    /* WINED3DDECLUSAGE_SAMPLE          */ "SAMPLE",
     397};
     398
    376399static const char *shader_semantic_name_from_usage(WINED3DDECLUSAGE usage)
    377400{
    378     static const char *semantic_names[] =
    379     {
    380         /* WINED3DDECLUSAGE_POSITION        */ "SV_POSITION",
    381         /* WINED3DDECLUSAGE_BLENDWEIGHT     */ "BLENDWEIGHT",
    382         /* WINED3DDECLUSAGE_BLENDINDICES    */ "BLENDINDICES",
    383         /* WINED3DDECLUSAGE_NORMAL          */ "NORMAL",
    384         /* WINED3DDECLUSAGE_PSIZE           */ "PSIZE",
    385         /* WINED3DDECLUSAGE_TEXCOORD        */ "TEXCOORD",
    386         /* WINED3DDECLUSAGE_TANGENT         */ "TANGENT",
    387         /* WINED3DDECLUSAGE_BINORMAL        */ "BINORMAL",
    388         /* WINED3DDECLUSAGE_TESSFACTOR      */ "TESSFACTOR",
    389         /* WINED3DDECLUSAGE_POSITIONT       */ "POSITIONT",
    390         /* WINED3DDECLUSAGE_COLOR           */ "COLOR",
    391         /* WINED3DDECLUSAGE_FOG             */ "FOG",
    392         /* WINED3DDECLUSAGE_DEPTH           */ "DEPTH",
    393         /* WINED3DDECLUSAGE_SAMPLE          */ "SAMPLE",
    394     };
    395 
    396401    if (usage >= sizeof(semantic_names) / sizeof(*semantic_names))
    397402    {
     
    401406
    402407    return semantic_names[usage];
     408}
     409
     410WINED3DDECLUSAGE shader_usage_from_semantic_name(const char *name)
     411{
     412    unsigned int i;
     413
     414    for (i = 0; i < sizeof(semantic_names) / sizeof(*semantic_names); ++i)
     415    {
     416        if (!strcmp(name, semantic_names[i])) return i;
     417    }
     418
     419    return ~0U;
    403420}
    404421
     
    423440
    424441HRESULT shader_get_registers_used(IWineD3DBaseShader *iface, const struct wined3d_shader_frontend *fe,
    425         struct shader_reg_maps *reg_maps, struct wined3d_shader_attribute *attributes,
    426         struct wined3d_shader_signature_element *input_signature,
     442        struct shader_reg_maps *reg_maps, struct wined3d_shader_signature_element *input_signature,
    427443        struct wined3d_shader_signature_element *output_signature, const DWORD *byte_code, DWORD constf_size)
    428444{
     
    484500            switch (semantic.reg.reg.type)
    485501            {
    486                 /* Vshader: mark attributes used
    487                  * Pshader: mark 3.0 input registers used, save token */
     502                /* Mark input registers used. */
    488503                case WINED3DSPR_INPUT:
    489504                    reg_maps->input_registers |= 1 << semantic.reg.reg.idx;
    490                     if (shader_version.type == WINED3D_SHADER_TYPE_VERTEX)
    491                     {
    492                         attributes[semantic.reg.reg.idx].usage = semantic.usage;
    493                         attributes[semantic.reg.reg.idx].usage_idx = semantic.usage_idx;
    494                     }
    495                     else
    496                     {
    497                         shader_signature_from_semantic(&input_signature[semantic.reg.reg.idx], &semantic);
    498                     }
     505                    shader_signature_from_semantic(&input_signature[semantic.reg.reg.idx], &semantic);
    499506                    break;
    500507
     
    14021409static BOOL shader_none_dirty_const(IWineD3DDevice *iface) {return FALSE;}
    14031410
    1404 #define GLINFO_LOCATION      (*gl_info)
    14051411static void shader_none_get_caps(WINED3DDEVTYPE devtype,
    14061412        const struct wined3d_gl_info *gl_info, struct shader_caps *pCaps)
     
    14111417    pCaps->PixelShader1xMaxValue = 0.0f;
    14121418}
    1413 #undef GLINFO_LOCATION
     1419
    14141420static BOOL shader_none_color_fixup_supported(struct color_fixup_desc fixup)
    14151421{
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