VirtualBox

Ignore:
Timestamp:
May 16, 2014 10:27:20 AM (11 years ago)
Author:
vboxsync
Message:

wine: update to 1.6.2

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/arb_program_shader.c

    r49419 r51270  
    4949WINE_DECLARE_DEBUG_CHANNEL(d3d);
    5050
    51 /* sRGB correction constants */
    52 static const float srgb_cmp = 0.0031308f;
    53 static const float srgb_mul_low = 12.92f;
    54 static const float srgb_pow = 0.41666f;
    55 static const float srgb_mul_high = 1.055f;
    56 static const float srgb_sub_high = 0.055f;
    57 
    5851static BOOL shader_is_pshader_version(enum wined3d_shader_type type)
    5952{
     
    766759    memset(priv->pshader_const_dirty + start, 1, sizeof(*priv->pshader_const_dirty) * count);
    767760    priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, start + count);
     761}
     762
     763static void shader_arb_append_imm_vec4(struct wined3d_shader_buffer *buffer, const float *values)
     764{
     765    char str[4][16];
     766
     767    wined3d_ftoa(values[0], str[0]);
     768    wined3d_ftoa(values[1], str[1]);
     769    wined3d_ftoa(values[2], str[2]);
     770    wined3d_ftoa(values[3], str[3]);
     771    shader_addline(buffer, "{%s, %s, %s, %s}", str[0], str[1], str[2], str[3]);
    768772}
    769773
     
    872876            const float *value;
    873877            value = (const float *)lconst->value;
    874             shader_addline(buffer, "PARAM C%u = {%.8e, %.8e, %.8e, %.8e};\n", lconst->idx,
    875                            value[0], value[1], value[2], value[3]);
     878            shader_addline(buffer, "PARAM C%u = ", lconst->idx);
     879            shader_arb_append_imm_vec4(buffer, value);
     880            shader_addline(buffer, ";\n");
    876881        }
    877882    }
     
    34463451    {
    34473452        /* Sigh. MOVC CC doesn't work, so use one of the temps as dummy dest */
    3448         shader_addline(buffer, "SUBC %s, %s.x, srgb_consts1.y;\n", tmp1, fragcolor);
     3453        shader_addline(buffer, "SUBC %s, %s.x, srgb_consts1.x;\n", tmp1, fragcolor);
    34493454        /* Calculate the > 0.0031308 case */
    3450         shader_addline(buffer, "POW %s.x (GE), %s.x, srgb_consts1.z;\n", fragcolor, fragcolor);
    3451         shader_addline(buffer, "POW %s.y (GE), %s.y, srgb_consts1.z;\n", fragcolor, fragcolor);
    3452         shader_addline(buffer, "POW %s.z (GE), %s.z, srgb_consts1.z;\n", fragcolor, fragcolor);
    3453         shader_addline(buffer, "MUL %s.xyz (GE), %s, srgb_consts1.w;\n", fragcolor, fragcolor);
    3454         shader_addline(buffer, "SUB %s.xyz (GE), %s, srgb_consts2.x;\n", fragcolor, fragcolor);
     3455        shader_addline(buffer, "POW %s.x (GE), %s.x, srgb_consts0.x;\n", fragcolor, fragcolor);
     3456        shader_addline(buffer, "POW %s.y (GE), %s.y, srgb_consts0.x;\n", fragcolor, fragcolor);
     3457        shader_addline(buffer, "POW %s.z (GE), %s.z, srgb_consts0.x;\n", fragcolor, fragcolor);
     3458        shader_addline(buffer, "MUL %s.xyz (GE), %s, srgb_consts0.y;\n", fragcolor, fragcolor);
     3459        shader_addline(buffer, "SUB %s.xyz (GE), %s, srgb_consts0.z;\n", fragcolor, fragcolor);
    34553460        /* Calculate the < case */
    3456         shader_addline(buffer, "MUL %s.xyz (LT), srgb_consts1.x, %s;\n", fragcolor, fragcolor);
     3461        shader_addline(buffer, "MUL %s.xyz (LT), srgb_consts0.w, %s;\n", fragcolor, fragcolor);
    34573462    }
    34583463    else
    34593464    {
    34603465        /* Calculate the > 0.0031308 case */
    3461         shader_addline(buffer, "POW %s.x, %s.x, srgb_consts1.z;\n", tmp1, fragcolor);
    3462         shader_addline(buffer, "POW %s.y, %s.y, srgb_consts1.z;\n", tmp1, fragcolor);
    3463         shader_addline(buffer, "POW %s.z, %s.z, srgb_consts1.z;\n", tmp1, fragcolor);
    3464         shader_addline(buffer, "MUL %s, %s, srgb_consts1.w;\n", tmp1, tmp1);
    3465         shader_addline(buffer, "SUB %s, %s, srgb_consts2.x;\n", tmp1, tmp1);
     3466        shader_addline(buffer, "POW %s.x, %s.x, srgb_consts0.x;\n", tmp1, fragcolor);
     3467        shader_addline(buffer, "POW %s.y, %s.y, srgb_consts0.x;\n", tmp1, fragcolor);
     3468        shader_addline(buffer, "POW %s.z, %s.z, srgb_consts0.x;\n", tmp1, fragcolor);
     3469        shader_addline(buffer, "MUL %s, %s, srgb_consts0.y;\n", tmp1, tmp1);
     3470        shader_addline(buffer, "SUB %s, %s, srgb_consts0.z;\n", tmp1, tmp1);
    34663471        /* Calculate the < case */
    3467         shader_addline(buffer, "MUL %s, srgb_consts1.x, %s;\n", tmp2, fragcolor);
     3472        shader_addline(buffer, "MUL %s, srgb_consts0.w, %s;\n", tmp2, fragcolor);
    34683473        /* Get 1.0 / 0.0 masks for > 0.0031308 and < 0.0031308 */
    3469         shader_addline(buffer, "SLT %s, srgb_consts1.y, %s;\n", tmp3, fragcolor);
    3470         shader_addline(buffer, "SGE %s, srgb_consts1.y, %s;\n", tmp4, fragcolor);
     3474        shader_addline(buffer, "SLT %s, srgb_consts1.x, %s;\n", tmp3, fragcolor);
     3475        shader_addline(buffer, "SGE %s, srgb_consts1.x, %s;\n", tmp4, fragcolor);
    34713476        /* Store the components > 0.0031308 in the destination */
    34723477        shader_addline(buffer, "MUL %s.xyz, %s, %s;\n", fragcolor, tmp1, tmp3);
     
    35973602
    35983603    char srgbtmp[4][4];
     3604    char ftoa_tmp[16];
    35993605    unsigned int i, found = 0;
    36003606
     
    37223728    shader_addline(buffer, "PARAM coefdiv = { 0.5, 0.25, 0.125, 0.0625 };\n");
    37233729    shader_addline(buffer, "PARAM coefmul = { 2, 4, 8, 16 };\n");
    3724     shader_addline(buffer, "PARAM ps_helper_const = { 0.0, 1.0, %1.10f, 0.0 };\n", eps);
     3730    wined3d_ftoa(eps, ftoa_tmp);
     3731    shader_addline(buffer, "PARAM ps_helper_const = { 0.0, 1.0, %s, 0.0 };\n", ftoa_tmp);
    37253732
    37263733    if (reg_maps->shader_version.major < 2)
     
    37463753    }
    37473754
    3748     if(args->super.srgb_correction) {
    3749         shader_addline(buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n",
    3750                        srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high);
    3751         shader_addline(buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n",
    3752                        srgb_sub_high, 0.0, 0.0, 0.0);
     3755    if (args->super.srgb_correction)
     3756    {
     3757        shader_addline(buffer, "PARAM srgb_consts0 = ");
     3758        shader_arb_append_imm_vec4(buffer, wined3d_srgb_const0);
     3759        shader_addline(buffer, ";\n");
     3760        shader_addline(buffer, "PARAM srgb_consts1 = ");
     3761        shader_arb_append_imm_vec4(buffer, wined3d_srgb_const1);
     3762        shader_addline(buffer, ";\n");
    37533763    }
    37543764
     
    42074217    if (need_helper_const(shader_data, reg_maps, gl_info))
    42084218    {
    4209         shader_addline(buffer, "PARAM helper_const = { 0.0, 1.0, 2.0, %1.10f};\n", eps);
     4219        char ftoa_tmp[16];
     4220        wined3d_ftoa(eps, ftoa_tmp);
     4221        shader_addline(buffer, "PARAM helper_const = { 0.0, 1.0, 2.0, %s};\n", ftoa_tmp);
    42104222    }
    42114223    if (need_rel_addr_const(shader_data, reg_maps, gl_info))
     
    61696181    UINT lowest_disabled_stage;
    61706182    const char *textype;
    6171     const char *instr, *sat;
     6183    const char *instr;
    61726184    char colorcor_dst[8];
    61736185    GLuint ret;
     
    62826294        shader_addline(&buffer, "PARAM tfactor = program.env[%u];\n", ARB_FFP_CONST_TFACTOR);
    62836295    }
    6284         shader_addline(&buffer, "PARAM specular_enable = program.env[%u];\n", ARB_FFP_CONST_SPECULAR_ENABLE);
    6285 
    6286     if(settings->sRGB_write) {
    6287         shader_addline(&buffer, "PARAM srgb_consts1 = {%f, %f, %f, %f};\n",
    6288                        srgb_mul_low, srgb_cmp, srgb_pow, srgb_mul_high);
    6289         shader_addline(&buffer, "PARAM srgb_consts2 = {%f, %f, %f, %f};\n",
    6290                        srgb_sub_high, 0.0, 0.0, 0.0);
     6296    shader_addline(&buffer, "PARAM specular_enable = program.env[%u];\n", ARB_FFP_CONST_SPECULAR_ENABLE);
     6297
     6298    if (settings->sRGB_write)
     6299    {
     6300        shader_addline(&buffer, "PARAM srgb_consts0 = ");
     6301        shader_arb_append_imm_vec4(&buffer, wined3d_srgb_const0);
     6302        shader_addline(&buffer, ";\n");
     6303        shader_addline(&buffer, "PARAM srgb_consts1 = ");
     6304        shader_arb_append_imm_vec4(&buffer, wined3d_srgb_const1);
     6305        shader_addline(&buffer, ";\n");
    62916306    }
    62926307
     
    63086323            default: textype = "unexpected_textype";   break;
    63096324        }
    6310 
    6311         if (settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP
    6312                 || settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE)
    6313             sat = "";
    6314         else
    6315             sat = "_SAT";
    63166325
    63176326        if(settings->op[stage].projected == proj_none) {
     
    63496358            }
    63506359
    6351             shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
    6352                     instr, sat, stage, stage, textype);
     6360            shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n",
     6361                    instr, stage, stage, textype);
    63536362            if (settings->op[stage - 1].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE)
    63546363            {
     
    63606369            shader_addline(&buffer, "MOV ret, fragment.texcoord[%u];\n", stage);
    63616370            shader_addline(&buffer, "MOV ret.w, ret.z;\n");
    6362             shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
    6363                             instr, sat, stage, stage, textype);
     6371            shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n",
     6372                            instr, stage, stage, textype);
    63646373        } else {
    6365             shader_addline(&buffer, "%s%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n",
    6366                             instr, sat, stage, stage, stage, textype);
     6374            shader_addline(&buffer, "%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n",
     6375                            instr, stage, stage, stage, textype);
    63676376        }
    63686377
     
    68886897{
    68896898    const char *tex;
     6899    static const float yv12_coef[]
     6900            = {2.0f / 3.0f, 1.0f / 6.0f, (2.0f / 3.0f) + (1.0f / 6.0f), 1.0f / 3.0f};
    68906901
    68916902    switch(textype) {
     
    69356946     * go from 0 to d3d_height, whereas the opengl texture height is 1.5 * d3d_height
    69366947     */
    6937     shader_addline(buffer, "PARAM yv12_coef = {%f, %f, %f, %f};\n",
    6938             2.0f / 3.0f, 1.0f / 6.0f, (2.0f / 3.0f) + (1.0f / 6.0f), 1.0f / 3.0f);
     6948    shader_addline(buffer, "PARAM yv12_coef = ");
     6949    shader_arb_append_imm_vec4(buffer, yv12_coef);
     6950    shader_addline(buffer, ";\n");
    69396951
    69406952    shader_addline(buffer, "MOV texcrd, fragment.texcoord[0];\n");
     
    74537465    /* Now load the surface */
    74547466    if (wined3d_settings.offscreen_rendering_mode != ORM_FBO
    7455             && (src_surface->flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE)) == SFLAG_INDRAWABLE)
     7467            && (src_surface->flags & (SFLAG_INTEXTURE | SFLAG_INDRAWABLE)) == SFLAG_INDRAWABLE
     7468            && !surface_is_offscreen(src_surface))
    74567469    {
    74577470        /* Without FBO blits transferring from the drawable to the texture is
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/buffer.c

    r48345 r51270  
    659659{
    660660    ULONG refcount = InterlockedDecrement(&buffer->resource.ref);
     661    struct wined3d_context *context;
    661662
    662663    TRACE("%p decreasing refcount to %u.\n", buffer, refcount);
     
    664665    if (!refcount)
    665666    {
    666         buffer_unload(&buffer->resource);
     667        if (buffer->buffer_object)
     668        {
     669            context = context_acquire(buffer->resource.device, NULL);
     670            delete_gl_buffer(buffer, context->gl_info);
     671            context_release(context);
     672
     673            HeapFree(GetProcessHeap(), 0, buffer->conversion_map);
     674        }
     675
    667676        resource_cleanup(&buffer->resource);
    668677        buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent);
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/context.c

    r48999 r51270  
    842842            return FALSE;
    843843        }
     844
     845        ctx->valid = 1;
    844846#else
    845847        return FALSE;
     
    10301032
    10311033    if (context->valid)
    1032     {
    1033         /* You'd figure ReleaseDC() would fail if the DC doesn't match the
    1034          * window. However, that's not what actually happens, and there are
    1035          * user32 tests that confirm ReleaseDC() with the wrong window is
    1036          * supposed to succeed. So explicitly check that the DC belongs to
    1037          * the window, since we want to avoid releasing a DC that belongs to
    1038          * some other window if the original window was already destroyed. */
    1039         if (WindowFromDC(context->hdc) != context->win_handle)
    1040         {
    1041             WARN("DC %p does not belong to window %p.\n",
    1042                     context->hdc, context->win_handle);
    1043         }
    1044 #ifndef VBOX
    1045         else if (!ReleaseDC(context->win_handle, context->hdc))
    1046 #else
    1047         else if (!VBoxExtReleaseDC(context->win_handle, context->hdc))
    1048 #endif
    1049         {
    1050             ERR("Failed to release device context %p, last error %#x.\n",
    1051                     context->hdc, GetLastError());
    1052         }
    1053     }
    1054     else context->valid = 1;
     1034        wined3d_release_dc(context->win_handle, context->hdc);
     1035    else
     1036        context->valid = 1;
    10551037
    10561038    context->win_handle = context->swapchain->win_handle;
     
    12111193# ifndef VBOX_WINE_WITH_SINGLE_CONTEXT
    12121194#  ifndef VBOX
    1213     ReleaseDC(context->win_handle, context->hdc);
     1195    wined3d_release_dc(context->win_handle, context->hdc);
    12141196#  else
    12151197    VBoxExtReleaseDC(context->win_handle, context->hdc);
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/device.c

    r49170 r51270  
    13791379    device->blitter->free_private(device);
    13801380    device->shader_backend->shader_free_private(device);
     1381    destroy_dummy_textures(device, gl_info);
    13811382
    13821383    /* Release the buffers (with sanity checks)*/
     
    51205121    else if (swapchain_desc->windowed)
    51215122    {
    5122         m.width = swapchain->orig_width;
    5123         m.height = swapchain->orig_height;
    5124         m.refresh_rate = 0;
    5125         m.format_id = swapchain->desc.backbuffer_format;
    5126         m.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN;
     5123        m = swapchain->original_mode;
    51275124    }
    51285125    else
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/directx.c

    r48999 r51270  
    146146    {"GL_ARB_texture_float",                ARB_TEXTURE_FLOAT             },
    147147    {"GL_ARB_texture_mirrored_repeat",      ARB_TEXTURE_MIRRORED_REPEAT   },
     148    {"GL_ARB_texture_mirror_clamp_to_edge", ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE},
    148149#ifdef VBOX_WITH_WINE_FIX_IBMTMR
    149150    {"GL_IBM_texture_mirrored_repeat",      ARB_TEXTURE_MIRRORED_REPEAT   },
     
    194195    {"GL_EXT_texture_filter_anisotropic",   EXT_TEXTURE_FILTER_ANISOTROPIC},
    195196    {"GL_EXT_texture_lod_bias",             EXT_TEXTURE_LOD_BIAS          },
     197    {"GL_EXT_texture_mirror_clamp",         EXT_TEXTURE_MIRROR_CLAMP      },
    196198    {"GL_EXT_texture_sRGB",                 EXT_TEXTURE_SRGB              },
    197199    {"GL_EXT_texture_sRGB_decode",          EXT_TEXTURE_SRGB_DECODE       },
     
    307309    }
    308310
    309     ReleaseDC(ctx->wnd, ctx->dc);
     311    wined3d_release_dc(ctx->wnd, ctx->dc);
    310312    DestroyWindow(ctx->wnd);
    311313
     
    13701372    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX650TI,   "NVIDIA GeForce GTX 650 Ti",        DRIVER_NVIDIA_GEFORCE6,  1024},
    13711373    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX660,     "NVIDIA GeForce GTX 660",           DRIVER_NVIDIA_GEFORCE6,  2048},
     1374    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX660M,    "NVIDIA GeForce GTX 660M",          DRIVER_NVIDIA_GEFORCE6,  2048},
    13721375    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX660TI,   "NVIDIA GeForce GTX 660 Ti",        DRIVER_NVIDIA_GEFORCE6,  2048},
    13731376    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX670,     "NVIDIA GeForce GTX 670",           DRIVER_NVIDIA_GEFORCE6,  2048},
     
    13751378    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX680,     "NVIDIA GeForce GTX 680",           DRIVER_NVIDIA_GEFORCE6,  2048},
    13761379    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX770M,    "NVIDIA GeForce GTX 770M",          DRIVER_NVIDIA_GEFORCE6,  3072},
     1380    {HW_VENDOR_NVIDIA,     CARD_NVIDIA_GEFORCE_GTX770,     "NVIDIA GeForce GTX 770",           DRIVER_NVIDIA_GEFORCE6,  2048},
    13771381
    13781382    /* AMD cards */
     
    17861790        {
    17871791            {"GTX 770M",    CARD_NVIDIA_GEFORCE_GTX770M},   /* Geforce 700 - midend high mobile */
     1792            {"GTX 770",     CARD_NVIDIA_GEFORCE_GTX770},    /* Geforce 700 - highend */
    17881793            {"GTX 680",     CARD_NVIDIA_GEFORCE_GTX680},    /* Geforce 600 - highend */
    17891794            {"GTX 670MX",   CARD_NVIDIA_GEFORCE_GTX670MX},  /* Geforce 600 - highend */
    17901795            {"GTX 670",     CARD_NVIDIA_GEFORCE_GTX670},    /* Geforce 600 - midend high */
    17911796            {"GTX 660 Ti",  CARD_NVIDIA_GEFORCE_GTX660TI},  /* Geforce 600 - midend high */
     1797            {"GTX 660M",    CARD_NVIDIA_GEFORCE_GTX660M},   /* Geforce 600 - midend high mobile */
    17921798            {"GTX 660",     CARD_NVIDIA_GEFORCE_GTX660},    /* Geforce 600 - midend high */
    17931799            {"GTX 650 Ti",  CARD_NVIDIA_GEFORCE_GTX650TI},  /* Geforce 600 - lowend */
     
    31113117            gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE;
    31123118    }
     3119    if (!gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] && gl_info->supported[EXT_TEXTURE_MIRROR_CLAMP])
     3120    {
     3121        TRACE(" IMPLIED: ATI_texture_mirror_once support (by EXT_texture_mirror_clamp).\n");
     3122        gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] = TRUE;
     3123    }
     3124    if (!gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] && gl_info->supported[ATI_TEXTURE_MIRROR_ONCE])
     3125    {
     3126        TRACE(" IMPLIED: ARB_texture_mirror_clamp_to_edge support (by ATI_texture_mirror_once).\n");
     3127        gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] = TRUE;
     3128    }
    31133129
    31143130    wined3d_adapter_init_limits(gl_info);
     
    32283244            gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] ? GL_CLAMP_TO_BORDER_ARB : GL_REPEAT;
    32293245    gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] =
    3230             gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT;
     3246            gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] ? GL_MIRROR_CLAMP_TO_EDGE : GL_REPEAT;
    32313247
    32323248    adapter->d3d_info.valid_rt_mask = 0;
     
    45824598        caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
    45834599    }
    4584     if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE])
     4600    if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
    45854601    {
    45864602        caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
     
    46004616            caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
    46014617        }
    4602         if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE])
     4618        if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
    46034619        {
    46044620            caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/drawprim.c

    r49170 r51270  
    6262        if (instance_count)
    6363        {
    64             if (!gl_info->supported[ARB_DRAW_INSTANCED])
     64            if (!gl_info->supported[ARB_DRAW_INSTANCED] && !gl_info->supported[ARB_INSTANCED_ARRAYS])
    6565            {
    6666                FIXME("Instanced drawing not supported.\n");
     
    7070                if (start_instance)
    7171                    FIXME("Start instance (%u) not supported.\n", start_instance);
     72                if (gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX])
     73                {
    7274                GL_EXTCALL(glDrawElementsInstancedBaseVertex(primitive_type, count, idxtype,
    7375                        (const char *)idx_data + (idx_size * start_idx), instance_count, base_vertex_index));
    7476                checkGLcall("glDrawElementsInstancedBaseVertex");
     77            }
     78                else
     79                {
     80                    GL_EXTCALL(glDrawElementsInstancedARB(primitive_type, count, idxtype,
     81                            (const char *)idx_data + (idx_size * start_idx), instance_count));
     82                    checkGLcall("glDrawElementsInstancedARB");
     83                }
    7584            }
    7685        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/glsl_shader.c

    r48509 r51270  
    4747#include "wined3d_private.h"
    4848
    49 #if defined(VBOX)
    50 # if defined(RT_ARCH_AMD64)
    51 #  define copysignf _copysignf
    52 # else
    53 #  define _VBOX_BITVAL_CAST(_t, _f) (*((const _t*)((const void*)(&(_f)))))
    54 #  define _VBOX_BITVAL_TO_FLOATL(_f) _VBOX_BITVAL_CAST(float, _f)
    55 #  define _VBOX_BITVAL_FROM_FLOAT(_f) _VBOX_BITVAL_CAST(uint32_t, _f)
    56 DECLINLINE(float) copysignf(float val, float sign)
    57 {
    58     uint32_t u32Val = ((_VBOX_BITVAL_FROM_FLOAT(val) & 0x7fffffff) | (_VBOX_BITVAL_FROM_FLOAT(sign) & 0x80000000));
    59     return _VBOX_BITVAL_TO_FLOATL(u32Val);
    60 }
    61 # endif
    62 #endif
    63 
    6449WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
    6550WINE_DECLARE_DEBUG_CHANNEL(d3d_constants);
     
    7156#define WINED3D_GLSL_SAMPLE_LOD         0x4
    7257#define WINED3D_GLSL_SAMPLE_GRAD        0x8
    73 
    74 static const float srgb_const0[] = {0.41666f, 1.055f, 0.055f, 12.92f};  /* pow, mul_high, sub_high, mul_low */
    75 static const float srgb_const1[] = {0.0031308f, 0.0f, 0.0f, 0.0f};      /* cmp */
    7658
    7759struct glsl_dst_param
     
    273255}
    274256
    275 /* This should be equivalent to using the %.8e format specifier, but always
    276  * using '.' as decimal separator. This doesn't handle +/-INF or NAN, since
    277  * the GLSL parser wouldn't be able to handle those anyway. */
    278 static void shader_glsl_ftoa(float value, char *s)
    279 {
    280     int x, frac, exponent;
    281     const char *sign = "";
    282     double d;
    283 
    284     d = value;
    285     if (copysignf(1.0f, value) < 0.0f)
    286     {
    287         d = -d;
    288         sign = "-";
    289     }
    290 
    291     if (d == 0.0f)
    292     {
    293         x = 0;
    294         frac = 0;
    295         exponent = 0;
    296     }
    297     else
    298     {
    299         double t, diff;
    300 
    301         exponent = floorf(log10f(d));
    302         d /= pow(10.0, exponent);
    303 
    304         x = d;
    305         t = (d - x) * 100000000;
    306         frac = t;
    307         diff = t - frac;
    308 
    309         if ((diff > 0.5) || (diff == 0.5 && (frac & 1)))
    310         {
    311             if (++frac >= 100000000)
    312             {
    313                 frac = 0;
    314                 ++x;
    315             }
    316         }
    317     }
    318 
    319     sprintf(s, "%s%d.%08de%+03d", sign, x, frac, exponent);
    320 }
    321 
    322257static void shader_glsl_append_imm_vec4(struct wined3d_shader_buffer *buffer, const float *values)
    323258{
    324259    char str[4][16];
    325260
    326     shader_glsl_ftoa(values[0], str[0]);
    327     shader_glsl_ftoa(values[1], str[1]);
    328     shader_glsl_ftoa(values[2], str[2]);
    329     shader_glsl_ftoa(values[3], str[3]);
     261    wined3d_ftoa(values[0], str[0]);
     262    wined3d_ftoa(values[1], str[1]);
     263    wined3d_ftoa(values[2], str[2]);
     264    wined3d_ftoa(values[3], str[3]);
    330265    shader_addline(buffer, "vec4(%s, %s, %s, %s)", str[0], str[1], str[2], str[3]);
    331266}
     
    534469        const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version)
    535470{
     471    unsigned int start = ~0U, end = 0;
    536472    int stack_idx = 0;
    537473    unsigned int heap_idx = 1;
     
    541477
    542478    idx = heap->entries[heap_idx].idx;
    543     if (constant_locations[idx] != -1) GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
     479    if (constant_locations[idx] != -1)
     480        start = end = idx;
    544481    stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT;
    545482
     
    557494                    idx = heap->entries[heap_idx].idx;
    558495                    if (constant_locations[idx] != -1)
    559                         GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
     496                    {
     497                        if (start > idx)
     498                            start = idx;
     499                        if (end < idx)
     500                            end = idx;
     501                    }
    560502
    561503                    stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT;
     
    573515                    idx = heap->entries[heap_idx].idx;
    574516                    if (constant_locations[idx] != -1)
    575                         GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4]));
     517                    {
     518                        if (start > idx)
     519                            start = idx;
     520                        if (end < idx)
     521                            end = idx;
     522                    }
    576523
    577524                    stack[stack_idx++] = HEAP_NODE_POP;
     
    587534        }
    588535    }
     536    if (start <= end)
     537        GL_EXTCALL(glUniform4fvARB(constant_locations[start], end - start + 1, &constants[start * 4]));
    589538    checkGLcall("walk_constant_heap()");
    590539}
     
    936885        for (i = 0; i < MAX_TEXTURES; ++i)
    937886        {
     887            if (prog->ps.bumpenv_mat_location[i] == -1)
     888                continue;
     889
    938890            GL_EXTCALL(glUniformMatrix2fvARB(prog->ps.bumpenv_mat_location[i], 1, 0,
    939891                        (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00]));
    940             GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_scale_location[i],
    941                         *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE]));
    942             GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_offset_location[i],
    943                         *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET]));
    944         }
    945 
     892
     893            if (prog->ps.bumpenv_lum_scale_location[i] != -1)
     894            {
     895                GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_scale_location[i], 1,
     896                        (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE]));
     897                GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_offset_location[i], 1,
     898                        (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET]));
     899            }
     900        }
     901
     902        if (prog->ps.tex_factor_location != -1)
     903        {
    946904        D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col);
    947         GL_EXTCALL(glUniform4fARB(prog->ps.tex_factor_location, col[0], col[1], col[2], col[3]));
     905            GL_EXTCALL(glUniform4fvARB(prog->ps.tex_factor_location, 1, col));
     906        }
    948907
    949908        if (state->render_states[WINED3D_RS_SPECULARENABLE])
     
    12961255        {
    12971256            shader_addline(buffer, "const vec4 srgb_const0 = ");
    1298             shader_glsl_append_imm_vec4(buffer, srgb_const0);
     1257            shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const0);
    12991258            shader_addline(buffer, ";\n");
    13001259            shader_addline(buffer, "const vec4 srgb_const1 = ");
    1301             shader_glsl_append_imm_vec4(buffer, srgb_const1);
     1260            shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const1);
    13021261            shader_addline(buffer, ";\n");
    13031262        }
     
    16821641                    {
    16831642                        case WINED3D_DATA_FLOAT:
    1684                             shader_glsl_ftoa(*(const float *)reg->immconst_data, register_name);
     1643                            wined3d_ftoa(*(const float *)reg->immconst_data, register_name);
    16851644                            break;
    16861645                        case WINED3D_DATA_INT:
     
    17021661                    {
    17031662                        case WINED3D_DATA_FLOAT:
    1704                             shader_glsl_ftoa(*(const float *)&reg->immconst_data[0], imm_str[0]);
    1705                             shader_glsl_ftoa(*(const float *)&reg->immconst_data[1], imm_str[1]);
    1706                             shader_glsl_ftoa(*(const float *)&reg->immconst_data[2], imm_str[2]);
    1707                             shader_glsl_ftoa(*(const float *)&reg->immconst_data[3], imm_str[3]);
     1663                            wined3d_ftoa(*(const float *)&reg->immconst_data[0], imm_str[0]);
     1664                            wined3d_ftoa(*(const float *)&reg->immconst_data[1], imm_str[1]);
     1665                            wined3d_ftoa(*(const float *)&reg->immconst_data[2], imm_str[2]);
     1666                            wined3d_ftoa(*(const float *)&reg->immconst_data[3], imm_str[3]);
    17081667                            sprintf(register_name, "vec4(%s, %s, %s, %s)",
    17091668                                    imm_str[0], imm_str[1], imm_str[2], imm_str[3]);
     
    49774936                    break;
    49784937                shader_addline(buffer, "dir = normalize(dir);\n");
    4979                 shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))"
     4938                shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)"
    49804939                        " * gl_LightSource[%u].diffuse.xyz) / att;\n", i);
    49814940                if (settings->localviewer)
     
    50024961                if (!settings->normal)
    50034962                    break;
    5004                 shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))"
     4963                shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)"
    50054964                        " * gl_LightSource[%u].diffuse.xyz) * att;\n", i);
    50064965                if (settings->localviewer)
     
    50174976                    break;
    50184977                shader_addline(buffer, "dir = normalize(gl_LightSource[%u].position.xyz);\n", i);
    5019                 shader_addline(buffer, "diffuse += max(0.0, dot(dir, normal)) * gl_LightSource[%u].diffuse.xyz;\n", i);
     4978                shader_addline(buffer, "diffuse += clamp(dot(dir, normal), 0.0, 1.0)"
     4979                        " * gl_LightSource[%u].diffuse.xyz;\n", i);
    50204980                shader_addline(buffer, "t = dot(normal, gl_LightSource[%u].halfVector.xyz);\n", i);
    50214981                shader_addline(buffer, "if (t > 0.0) specular += pow(t, gl_FrontMaterial.shininess)"
     
    51255085
    51265086        case WINED3D_FFP_VS_FOG_DEPTH:
     5087            if (settings->ortho_fog)
     5088                /* Need to undo the [0.0 - 1.0] -> [-1.0 - 1.0] transformation from D3D to GL coordinates. */
     5089                shader_addline(buffer, "gl_FogFragCoord = gl_Position.z * 0.5 + 0.5;\n");
     5090            else
    51275091            shader_addline(buffer, "gl_FogFragCoord = ec_pos.z;\n");
    51285092            break;
     
    55235487    {
    55245488        shader_addline(buffer, "const vec4 srgb_const0 = ");
    5525         shader_glsl_append_imm_vec4(buffer, srgb_const0);
     5489        shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const0);
    55265490        shader_addline(buffer, ";\n");
    55275491        shader_addline(buffer, "const vec4 srgb_const1 = ");
    5528         shader_glsl_append_imm_vec4(buffer, srgb_const1);
     5492        shader_glsl_append_imm_vec4(buffer, wined3d_srgb_const1);
    55295493        shader_addline(buffer, ";\n");
    55305494    }
     
    55405504        const char *texture_function, *coord_mask;
    55415505        char tex_reg_name[8];
    5542         BOOL proj, clamp;
     5506        BOOL proj;
    55435507
    55445508        if (!(tex_map & (1 << stage)))
     
    55595523            proj = TRUE;
    55605524        }
    5561 
    5562         if (settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP
    5563                 || settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE)
    5564             clamp = FALSE;
    5565         else
    5566             clamp = TRUE;
    55675525
    55685526        switch (settings->op[stage].tex_type)
     
    56575615            }
    56585616
    5659             if (clamp)
    5660                 shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, ret.%s), 0.0, 1.0);\n",
    5661                         stage, texture_function, stage, coord_mask);
    5662             else
    56635617                shader_addline(buffer, "tex%u = %s(ps_sampler%u, ret.%s);\n",
    56645618                        stage, texture_function, stage, coord_mask);
     
    56705624        else if (settings->op[stage].projected == proj_count3)
    56715625        {
    5672             if (clamp)
    5673                 shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].xyz), 0.0, 1.0);\n",
    5674                         stage, texture_function, stage, stage);
    5675             else
    56765626                shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].xyz);\n",
    56775627                        stage, texture_function, stage, stage);
     
    56795629        else
    56805630        {
    5681             if (clamp)
    5682                 shader_addline(buffer, "tex%u = clamp(%s(ps_sampler%u, gl_TexCoord[%u].%s), 0.0, 1.0);\n",
    5683                         stage, texture_function, stage, stage, coord_mask);
    5684             else
    56855631                shader_addline(buffer, "tex%u = %s(ps_sampler%u, gl_TexCoord[%u].%s);\n",
    56865632                        stage, texture_function, stage, stage, coord_mask);
     
    68006746    caps->xyzrhw = TRUE;
    68016747    caps->max_active_lights = gl_info->limits.lights;
    6802     caps->max_vertex_blend_matrices = 0;
     6748    caps->max_vertex_blend_matrices = 1;
    68036749    caps->max_vertex_blend_matrix_index = 0;
    68046750    caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
     
    68746820{
    68756821    context->select_shader = 1;
     6822}
     6823
     6824static void glsl_vertex_pipe_projection(struct wined3d_context *context,
     6825        const struct wined3d_state *state, DWORD state_id)
     6826{
     6827    /* Table fog behavior depends on the projection matrix. */
     6828    if (state->render_states[WINED3D_RS_FOGENABLE]
     6829            && state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE)
     6830        context->select_shader = 1;
     6831    transform_projection(context, state, state_id);
    68766832}
    68776833
     
    69296885    /* Transform states */
    69306886    {STATE_TRANSFORM(WINED3D_TS_VIEW),                           {STATE_TRANSFORM(WINED3D_TS_VIEW),                           transform_view         }, WINED3D_GL_EXT_NONE          },
    6931     {STATE_TRANSFORM(WINED3D_TS_PROJECTION),                     {STATE_TRANSFORM(WINED3D_TS_PROJECTION),                     transform_projection   }, WINED3D_GL_EXT_NONE          },
     6887    {STATE_TRANSFORM(WINED3D_TS_PROJECTION),                     {STATE_TRANSFORM(WINED3D_TS_PROJECTION),                     glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE      },
    69326888    {STATE_TRANSFORM(WINED3D_TS_TEXTURE0),                       {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL                   }, WINED3D_GL_EXT_NONE          },
    69336889    {STATE_TRANSFORM(WINED3D_TS_TEXTURE1),                       {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL                   }, WINED3D_GL_EXT_NONE          },
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/nvidia_texture_shader.c

    r48345 r51270  
    593593}
    594594
     595static void nvrc_resultarg(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
     596{
     597    DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
     598
     599    TRACE("Setting result arg for stage %u.\n", stage);
     600
     601    if (!isStateDirty(context, STATE_TEXTURESTAGE(stage, WINED3D_TSS_COLOR_OP)))
     602    {
     603        context_apply_state(context, state, STATE_TEXTURESTAGE(stage, WINED3D_TSS_COLOR_OP));
     604    }
     605    if (!isStateDirty(context, STATE_TEXTURESTAGE(stage, WINED3D_TSS_ALPHA_OP)))
     606    {
     607        context_apply_state(context, state, STATE_TEXTURESTAGE(stage, WINED3D_TSS_ALPHA_OP));
     608    }
     609}
     610
    595611static void nvts_texdim(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
    596612{
     
    782798    { STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    783799    { STATE_TEXTURESTAGE(0, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(0, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    784     { STATE_TEXTURESTAGE(0, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     800    { STATE_TEXTURESTAGE(0, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(0, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    785801    { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    786802    { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    795811    { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    796812    { STATE_TEXTURESTAGE(1, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(1, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    797     { STATE_TEXTURESTAGE(1, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     813    { STATE_TEXTURESTAGE(1, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(1, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    798814    { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    799815    { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    808824    { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    809825    { STATE_TEXTURESTAGE(2, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(2, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    810     { STATE_TEXTURESTAGE(2, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     826    { STATE_TEXTURESTAGE(2, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(2, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    811827    { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    812828    { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    821837    { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    822838    { STATE_TEXTURESTAGE(3, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(3, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    823     { STATE_TEXTURESTAGE(3, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     839    { STATE_TEXTURESTAGE(3, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(3, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    824840    { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    825841    { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    834850    { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    835851    { STATE_TEXTURESTAGE(4, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(4, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    836     { STATE_TEXTURESTAGE(4, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     852    { STATE_TEXTURESTAGE(4, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(4, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    837853    { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    838854    { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    847863    { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    848864    { STATE_TEXTURESTAGE(5, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(5, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    849     { STATE_TEXTURESTAGE(5, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     865    { STATE_TEXTURESTAGE(5, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(5, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    850866    { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    851867    { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    860876    { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    861877    { STATE_TEXTURESTAGE(6, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(6, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    862     { STATE_TEXTURESTAGE(6, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     878    { STATE_TEXTURESTAGE(6, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(6, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    863879    { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP),        { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP),        nvrc_colorop        }, WINED3D_GL_EXT_NONE             },
    864880    { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_ARG1),      { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     
    873889    { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_ARG0),      { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    874890    { STATE_TEXTURESTAGE(7, WINED3D_TSS_ALPHA_ARG0),      { STATE_TEXTURESTAGE(7, WINED3D_TSS_ALPHA_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
    875     { STATE_TEXTURESTAGE(7, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP),        NULL                }, WINED3D_GL_EXT_NONE             },
     891    { STATE_TEXTURESTAGE(7, WINED3D_TSS_RESULT_ARG),      { STATE_TEXTURESTAGE(7, WINED3D_TSS_RESULT_ARG),      nvrc_resultarg      }, WINED3D_GL_EXT_NONE             },
    876892    { STATE_PIXELSHADER,                                  { STATE_PIXELSHADER,                                  apply_pixelshader   }, WINED3D_GL_EXT_NONE             },
    877893    { STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE),           { STATE_PIXELSHADER,                                  NULL                }, WINED3D_GL_EXT_NONE             },
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/shader.c

    r48345 r51270  
    4646static void shader_chache_put(PVBOXEXT_HASHCACHE pCache, struct wined3d_shader *shader);
    4747#endif
     48
     49/* pow, mul_high, sub_high, mul_low */
     50const float wined3d_srgb_const0[] = {0.41666f, 1.055f, 0.055f, 12.92f};
     51/* cmp */
     52const float wined3d_srgb_const1[] = {0.0031308f, 0.0f, 0.0f, 0.0f};
    4853
    4954static const char * const shader_opcode_names[] =
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/state.c

    r49170 r51270  
    47554755                vp.width, vp.height);
    47564756    }
    4757 
    4758     if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)))
    4759         state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE));
    4760 
    47614757    checkGLcall("glViewport");
    47624758}
     
    47664762    if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION)))
    47674763        transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION));
    4768     if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)))
     4764    if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))
     4765            && state->render_states[WINED3D_RS_POINTSCALEENABLE])
    47694766        state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE));
    47704767    /* Update the position fixup. */
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/surface.c

    r48611 r51270  
    43924392    {
    43934393        ERR("Not supported on swapchain surfaces.\n");
    4394         return WINEDDERR_NOTFLIPPABLE;
    4395     }
    4396 
    4397     /* Flipping is only supported on render targets and overlays. */
    4398     if (!(surface->resource.usage & (WINED3DUSAGE_RENDERTARGET | WINED3DUSAGE_OVERLAY)))
    4399     {
    4400         WARN("Tried to flip a non-render target, non-overlay surface.\n");
    44014394        return WINEDDERR_NOTFLIPPABLE;
    44024395    }
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/swapchain.c

    r48345 r51270  
    158158{
    159159#ifndef VBOX_WITH_WDDM
    160     struct wined3d_display_mode mode;
    161160    HRESULT hr;
    162161#endif
     
    213212    if (!swapchain->desc.windowed && swapchain->desc.auto_restore_display_mode)
    214213    {
    215         mode.width = swapchain->orig_width;
    216         mode.height = swapchain->orig_height;
    217         mode.refresh_rate = 0;
    218         mode.format_id = swapchain->orig_fmt;
    219         mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN;
    220214        if (FAILED(hr = wined3d_set_adapter_display_mode(swapchain->device->wined3d,
    221                 swapchain->device->adapter->ordinal, &mode)))
     215                swapchain->device->adapter->ordinal, &swapchain->original_mode)))
    222216            ERR("Failed to restore display mode, hr %#x.\n", hr);
    223217    }
     
    227221        TRACE("Destroying backup wined3d window %p, dc %p.\n", swapchain->backup_wnd, swapchain->backup_dc);
    228222
    229         ReleaseDC(swapchain->backup_wnd, swapchain->backup_dc);
     223        wined3d_release_dc(swapchain->backup_wnd, swapchain->backup_dc);
    230224        DestroyWindow(swapchain->backup_wnd);
    231225    }
     
    10201014    const struct wined3d_adapter *adapter = device->adapter;
    10211015    struct wined3d_resource_desc surface_desc;
    1022     const struct wined3d_format *format;
    1023     struct wined3d_display_mode mode;
    10241016#ifndef VBOX_WITH_WDDM
    10251017    BOOL displaymode_set = FALSE;
     
    11011093#endif
    11021094
    1103     wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &mode, NULL);
    11041095#ifndef VBOX_WITH_WDDM
    1105     swapchain->orig_width = mode.width;
    1106     swapchain->orig_height = mode.height;
    1107     swapchain->orig_fmt = mode.format_id;
    1108 #endif
    1109     format = wined3d_get_format(&adapter->gl_info, mode.format_id);
     1096    if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d,
     1097            adapter->ordinal, &swapchain->original_mode, NULL)))
     1098    {
     1099        ERR("Failed to get current display mode, hr %#x.\n", hr);
     1100        goto err;
     1101    }
     1102#endif
    11101103
    11111104    GetClientRect(window, &client_rect);
     
    11291122        if (desc->backbuffer_format == WINED3DFMT_UNKNOWN)
    11301123        {
    1131             desc->backbuffer_format = swapchain->orig_fmt;
    1132             TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->orig_fmt));
     1124            desc->backbuffer_format = swapchain->original_mode.format_id;
     1125            TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->original_mode.format_id));
    11331126        }
    11341127#endif
     
    11771170        mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN;
    11781171
    1179         if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, device->adapter->ordinal, &mode)))
     1172        if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, adapter->ordinal, &mode)))
    11801173        {
    11811174            WARN("Failed to set display mode, hr %#x.\n", hr);
     
    11981191        };
    11991192
    1200         const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
     1193        const struct wined3d_gl_info *gl_info = &adapter->gl_info;
    12011194
    12021195        swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context));
     
    13121305    if (displaymode_set)
    13131306    {
    1314         DEVMODEW devmode;
    1315 
     1307        if (FAILED(wined3d_set_adapter_display_mode(device->wined3d,
     1308                adapter->ordinal, &swapchain->original_mode)))
     1309            ERR("Failed to restore display mode.\n");
    13161310        ClipCursor(NULL);
    1317 
    1318         /* Change the display settings */
    1319         memset(&devmode, 0, sizeof(devmode));
    1320         devmode.dmSize = sizeof(devmode);
    1321         devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
    1322         devmode.dmBitsPerPel = format->byte_count * CHAR_BIT;
    1323         devmode.dmPelsWidth = swapchain->orig_width;
    1324         devmode.dmPelsHeight = swapchain->orig_height;
    1325         ChangeDisplaySettingsExW(adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL);
    13261311    }
    13271312#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/utils.c

    r48345 r51270  
    3636#include "config.h"
    3737#include "wine/port.h"
     38
     39#include <stdio.h>
    3840
    3941#include "wined3d_private.h"
     
    847849            NV_TEXTURE_SHADER,          NULL},
    848850    /* Depth stencil formats */
     851    {WINED3DFMT_D16_LOCKABLE,           GL_DEPTH_COMPONENT,               GL_DEPTH_COMPONENT,                     0,
     852            GL_DEPTH_COMPONENT,         GL_UNSIGNED_SHORT,                0,
     853            WINED3DFMT_FLAG_DEPTH,
     854            WINED3D_GL_EXT_NONE,        NULL},
    849855    {WINED3DFMT_D16_LOCKABLE,           GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
    850856            GL_DEPTH_COMPONENT,         GL_UNSIGNED_SHORT,                0,
    851857            WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_SHADOW,
    852858            ARB_DEPTH_TEXTURE,          NULL},
     859    {WINED3DFMT_D32_UNORM,              GL_DEPTH_COMPONENT,               GL_DEPTH_COMPONENT,                     0,
     860            GL_DEPTH_COMPONENT,         GL_UNSIGNED_INT,                  0,
     861            WINED3DFMT_FLAG_DEPTH,
     862            WINED3D_GL_EXT_NONE,        NULL},
    853863    {WINED3DFMT_D32_UNORM,              GL_DEPTH_COMPONENT32_ARB,         GL_DEPTH_COMPONENT32_ARB,               0,
    854864            GL_DEPTH_COMPONENT,         GL_UNSIGNED_INT,                  0,
     
    882892            | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW,
    883893            ARB_FRAMEBUFFER_OBJECT,     NULL},
     894    {WINED3DFMT_X8D24_UNORM,            GL_DEPTH_COMPONENT,               GL_DEPTH_COMPONENT,                     0,
     895            GL_DEPTH_COMPONENT,         GL_UNSIGNED_INT,                  0,
     896            WINED3DFMT_FLAG_DEPTH,
     897            WINED3D_GL_EXT_NONE,        NULL},
    884898    {WINED3DFMT_X8D24_UNORM,            GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
    885899            GL_DEPTH_COMPONENT,         GL_UNSIGNED_INT,                  0,
     
    899913            WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL | WINED3DFMT_FLAG_SHADOW,
    900914            ARB_FRAMEBUFFER_OBJECT,     convert_s4x4_uint_d24_unorm},
     915    {WINED3DFMT_D16_UNORM,              GL_DEPTH_COMPONENT,               GL_DEPTH_COMPONENT,                     0,
     916            GL_DEPTH_COMPONENT,         GL_UNSIGNED_SHORT,                0,
     917            WINED3DFMT_FLAG_DEPTH,
     918            WINED3D_GL_EXT_NONE,        NULL},
    901919    {WINED3DFMT_D16_UNORM,              GL_DEPTH_COMPONENT24_ARB,         GL_DEPTH_COMPONENT24_ARB,               0,
    902920            GL_DEPTH_COMPONENT,         GL_UNSIGNED_SHORT,                0,
     
    36283646    }
    36293647
     3648    settings->ortho_fog = 0;
    36303649    if (!state->render_states[WINED3D_RS_FOGENABLE])
    36313650        settings->fog_mode = WINED3D_FFP_VS_FOG_OFF;
    36323651    else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE)
     3652    {
    36333653        settings->fog_mode = WINED3D_FFP_VS_FOG_DEPTH;
     3654
     3655        if (state->transforms[WINED3D_TS_PROJECTION].u.m[0][3] == 0.0f
     3656                && state->transforms[WINED3D_TS_PROJECTION].u.m[1][3] == 0.0f
     3657                && state->transforms[WINED3D_TS_PROJECTION].u.m[2][3] == 0.0f
     3658                && state->transforms[WINED3D_TS_PROJECTION].u.m[3][3] == 1.0f)
     3659            settings->ortho_fog = 1;
     3660    }
    36343661    else if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE)
    36353662        settings->fog_mode = WINED3D_FFP_VS_FOG_FOGCOORD;
     
    37173744        IntersectRect(rect, rect, &state->scissor_rect);
    37183745}
     3746
     3747/* Print a floating point value with the %.8e format specifier, always using
     3748 * '.' as decimal separator. */
     3749void wined3d_ftoa(float value, char *s)
     3750{
     3751    int idx = 1;
     3752#ifdef VBOX_WITH_WINE_FIX_FTOA
     3753    const char * pszFormat = "%.8e";
     3754#endif
     3755
     3756    if (copysignf(1.0f, value) < 0.0f)
     3757    {
     3758#ifdef VBOX_WITH_WINE_FIX_FTOA
     3759        /* s passed here is char[16]*/
     3760        pszFormat = "%.7e";
     3761#endif
     3762        ++idx;
     3763    }
     3764
     3765#ifdef VBOX_WITH_WINE_FIX_FTOA
     3766    sprintf(s, pszFormat, value);
     3767#else
     3768    sprintf(s, "%.8e", value);
     3769#endif
     3770    if (isfinite(value))
     3771        s[idx] = '.';
     3772}
     3773
     3774void wined3d_release_dc(HWND window, HDC dc)
     3775{
     3776    /* You'd figure ReleaseDC() would fail if the DC doesn't match the window.
     3777     * However, that's not what actually happens, and there are user32 tests
     3778     * that confirm ReleaseDC() with the wrong window is supposed to succeed.
     3779     * So explicitly check that the DC belongs to the window, since we want to
     3780     * avoid releasing a DC that belongs to some other window if the original
     3781     * window was already destroyed. */
     3782    if (WindowFromDC(dc) != window)
     3783        WARN("DC %p does not belong to window %p.\n", dc, window);
     3784    else if (!ReleaseDC(window, dc))
     3785        ERR("Failed to release device context %p, last error %#x.\n", dc, GetLastError());
     3786}
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_gl.h

    r48999 r51270  
    9494    ARB_TEXTURE_FLOAT,
    9595    ARB_TEXTURE_MIRRORED_REPEAT,
     96    ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE,
    9697    ARB_TEXTURE_NON_POWER_OF_TWO,
    9798    ARB_TEXTURE_RECTANGLE,
     
    137138    EXT_TEXTURE_FILTER_ANISOTROPIC,
    138139    EXT_TEXTURE_LOD_BIAS,
     140    EXT_TEXTURE_MIRROR_CLAMP,
    139141    EXT_TEXTURE_SRGB,
    140142    EXT_TEXTURE_SRGB_DECODE,
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_private.h

    r49170 r51270  
    15421542    CARD_NVIDIA_GEFORCE_GTX650TI    = 0x11c6,
    15431543    CARD_NVIDIA_GEFORCE_GTX660      = 0x11c0,
     1544    CARD_NVIDIA_GEFORCE_GTX660M     = 0x0fd4,
    15441545    CARD_NVIDIA_GEFORCE_GTX660TI    = 0x1183,
    15451546    CARD_NVIDIA_GEFORCE_GTX670      = 0x1189,
     
    15471548    CARD_NVIDIA_GEFORCE_GTX680      = 0x1180,
    15481549    CARD_NVIDIA_GEFORCE_GTX770M     = 0x11e0,
     1550    CARD_NVIDIA_GEFORCE_GTX770      = 0x1184,
    15491551
    15501552    CARD_INTEL_830M                 = 0x3577,
     
    17901792void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN;
    17911793void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect) DECLSPEC_HIDDEN;
     1794void wined3d_ftoa(float value, char *s) DECLSPEC_HIDDEN;
     1795
     1796extern const float wined3d_srgb_const0[] DECLSPEC_HIDDEN;
     1797extern const float wined3d_srgb_const1[] DECLSPEC_HIDDEN;
    17921798
    17931799enum wined3d_ffp_vs_fog_mode
     
    18221828    DWORD fog_mode        : 2;
    18231829    DWORD texcoords       : 8;  /* MAX_TEXTURES */
    1824     DWORD padding         : 15;
     1830    DWORD ortho_fog       : 1;
     1831    DWORD padding         : 14;
    18251832
    18261833    BYTE texgen[MAX_TEXTURES];
     
    27012708    struct wined3d_swapchain_desc desc;
    27022709#ifndef VBOX_WITH_WDDM
    2703     DWORD orig_width, orig_height;
    2704     enum wined3d_format_id orig_fmt;
     2710    struct wined3d_display_mode original_mode;
    27052711    struct wined3d_gamma_ramp orig_gamma;
    27062712#endif
     
    28372843unsigned int count_bits(unsigned int mask) DECLSPEC_HIDDEN;
    28382844
     2845void wined3d_release_dc(HWND window, HDC dc) DECLSPEC_HIDDEN;
     2846
    28392847struct wined3d_shader_lconst
    28402848{
     
    31853193#endif
    31863194
    3187 #endif
     3195#if defined(VBOX)
     3196# if defined(RT_ARCH_AMD64)
     3197#  define copysignf _copysignf
     3198# else
     3199#  define _VBOX_BITVAL_CAST(_t, _f) (*((const _t*)((const void*)(&(_f)))))
     3200#  define _VBOX_BITVAL_TO_FLOATL(_f) _VBOX_BITVAL_CAST(float, _f)
     3201#  define _VBOX_BITVAL_FROM_FLOAT(_f) _VBOX_BITVAL_CAST(uint32_t, _f)
     3202DECLINLINE(float) copysignf(float val, float sign)
     3203{
     3204    uint32_t u32Val = ((_VBOX_BITVAL_FROM_FLOAT(val) & 0x7fffffff) | (_VBOX_BITVAL_FROM_FLOAT(sign) & 0x80000000));
     3205    return _VBOX_BITVAL_TO_FLOATL(u32Val);
     3206}
     3207# endif
     3208
     3209# define isfinite _finite
     3210
     3211#endif
     3212
     3213#endif
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