VirtualBox

Ignore:
Timestamp:
Aug 5, 2016 1:58:31 AM (8 years ago)
Author:
vboxsync
Message:

GA/NT/Graphics: warnings

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/Makefile.kmk

    r63024 r63025  
    4444#  -wd4245: '=' : conversion from 'int' to 'DWORD', signed/unsigned mismatch
    4545#  -wd4305: 'function' : truncation from 'double' to 'GLclampf'
    46 TEMPLATE_VBoxGuestWineDLL_CFLAGS = $(filter-out -WX,$(TEMPLATE_VBOXGUESTR3NPDLL_CFLAGS)) -wd4100  -wd4204 -wd4245 -wd4305
     46#  -wd4305: 'function' : truncation from 'double' to 'GLclampf'
     47#  -wd4018: '>' : signed/unsigned mismatch
     48#  -wd4389: '!=' : signed/unsigned mismatch
     49#  -wd4221: nonstandard extension used : 'render_targets' : cannot be initialized using address of automatic variable 'dst_surface'
     50#  -wd4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
     51#  -wd4267: 'function' : conversion from 'size_t' to 'GLsizei', possible loss of data
     52TEMPLATE_VBoxGuestWineDLL_CFLAGS = $(filter-out -WX,$(TEMPLATE_VBOXGUESTR3NPDLL_CFLAGS)) \
     53        -wd4100  -wd4204 -wd4245 -wd4305 -wd4018 -wd4389 -wd4221 -wd4334 -wd4267
    4754
    4855#
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/d3d8/device.c

    r48345 r63025  
    3636#define NONAMELESSUNION
    3737#define NONAMELESSSTRUCT
     38#ifdef VBOX
     39# include "d3d8_private.h" /* Must include windows stuff with COBJMACROS defined. */
     40#endif
    3841#include "windef.h"
    3942#include "winbase.h"
     
    24652468    }
    24662469
    2467     hr = wined3d_shader_get_byte_code(shader_impl->wined3d_shader, data, data_size);
     2470    hr = wined3d_shader_get_byte_code(shader_impl->wined3d_shader, data, (UINT *)data_size);
    24682471    wined3d_mutex_unlock();
    24692472
     
    27092712    }
    27102713
    2711     hr = wined3d_shader_get_byte_code(shader_impl->wined3d_shader, data, data_size);
     2714    hr = wined3d_shader_get_byte_code(shader_impl->wined3d_shader, data, (UINT *)data_size);
    27122715    wined3d_mutex_unlock();
    27132716
     
    30713074    HRESULT hr;
    30723075
    3073     device->IDirect3DDevice8_iface.lpVtbl = &d3d8_device_vtbl;
     3076    device->IDirect3DDevice8_iface.lpVtbl = (struct IDirect3DDevice8Vtbl *)&d3d8_device_vtbl;
    30743077    device->device_parent.ops = &d3d8_wined3d_device_parent_ops;
    30753078    device->ref = 1;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/d3d8/directx.c

    r48345 r63025  
    3636#define NONAMELESSUNION
    3737#define NONAMELESSSTRUCT
     38#ifndef VBOX
    3839#include "windef.h"
    3940#include "winbase.h"
    4041#include "wingdi.h"
    4142#include "winuser.h"
     43#else
     44# include <iprt/win/windows.h>
     45#endif
    4246#include "wine/debug.h"
    4347#include "wine/unicode.h"
     
    416420    DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING;
    417421
    418     d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
     422    d3d8->IDirect3D8_iface.lpVtbl = (struct IDirect3D8Vtbl *)&d3d8_vtbl;
    419423    d3d8->refcount = 1;
    420424
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/VBoxDbgGl.c

    r62522 r63025  
    304304        GLint curTex = 0;
    305305        int iLevel;
    306         struct gl_texture *pGlTex;
     306        struct gl_texture const *pGlTex;
    307307        const struct wined3d_texture *pTexture = (const struct wined3d_texture*)pDevice->stateBlock->state.textures[iStage];
    308308
     
    348348            Assert(surface->texture_target == pTexture->target);
    349349            Assert(surface->texture_name == (pTexture->flags & WINED3D_TEXTURE_IS_SRGB) ? pTexture->texture_srgb.name : pTexture->texture_rgb.name);
     350            NOREF(surface);
    350351#if 0
    351352            if (pSurf->flags & SFLAG_INSYSMEM && !pSurf->Flags & SFLAG_PBO)
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/vbox/libWineStub/include/wine/debug.h

    r63017 r63025  
    3232
    3333#include <stdarg.h>
     34#ifndef VBOX_WINE_WITHOUT_LIBWINE
    3435#include <windef.h>
     36#else
     37# include <iprt/win/windows.h>
     38#endif
    3539#ifndef GUID_DEFINED
    3640#include <guiddef.h>
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/arb_program_shader.c

    r51270 r63025  
    42324232    /* Base Declarations */
    42334233    shader_generate_arb_declarations(shader, reg_maps, buffer, gl_info,
    4234             &priv_ctx.vs_clipplanes, &priv_ctx);
     4234            (DWORD *)&priv_ctx.vs_clipplanes, &priv_ctx);
    42354235
    42364236    for(i = 0; i < MAX_CONST_I; i++)
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/buffer.c

    r51270 r63025  
    371371    BOOL support_d3dcolor = adapter->gl_info.supported[ARB_VERTEX_ARRAY_BGRA];
    372372    BOOL support_xyzrhw = adapter->d3d_info.xyzrhw;
     373#ifdef VBOX_WITH_WINE_FIX_BUFOFFSET
     374    DWORD stride_this_run = 0;
     375    DWORD offset_this_run = 0;
     376#else
    373377    UINT stride_this_run = 0;
    374 #ifdef VBOX_WITH_WINE_FIX_BUFOFFSET
    375     UINT offset_this_run = 0;
    376378#endif
    377379    BOOL ret = FALSE;
     
    866868    struct wined3d_context *context;
    867869    BOOL decl_changed = FALSE;
     870#ifndef VBOX_WITH_WINE_FIX_BUFOFFSET
    868871    unsigned int i, j;
     872#endif
    869873    BYTE *data;
    870874#ifdef VBOX_WITH_WINE_FIX_BUFOFFSET
     875    unsigned int j;
    871876    BYTE *cur_ptr;
    872877    UINT conv_start, conv_end;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/context.c

    r63021 r63025  
    792792    if (backup || !wglMakeCurrent(ctx->hdc, ctx->glCtx))
    793793#else
    794     if (!wglMakeCurrent(ctx->swapchain->hDC, ctx->glCtx))
     794    if (!wglMakeCurrent(swapchain->hDC, ctx->glCtx))
    795795#endif
    796796    {
     
    804804#else
    805805        WARN("Failed to make GL context %p current on device context %p, last error %#x.\n",
    806                 ctx->glCtx, ctx->swapchain->hDC, GetLastError());
     806                ctx->glCtx, swapchain->hDC, GetLastError());
    807807#endif
    808808        ctx->valid = 0;
     
    16281628    struct wined3d_context *ret;
    16291629    BOOL auxBuffers = FALSE;
    1630     HGLRC ctx, share_ctx;
     1630    HGLRC ctx;
     1631#ifndef VBOX
     1632    HGLRC share_ctx;
     1633#endif
    16311634    int pixel_format;
    16321635    unsigned int s;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/directx.c

    r63024 r63025  
    17751775        const char *gl_renderer)
    17761776{
     1777#ifndef VBOX_WITH_WDDM
    17771778    UINT d3d_level = d3d_level_from_gl_info(gl_info);
     1779#endif
    17781780    unsigned int i;
    17791781
     
    18771879    }
    18781880
     1881#ifndef VBOX_WITH_WDDM
    18791882    /* Both the GeforceFX, 6xxx and 7xxx series support D3D9. The last two types have more
    18801883     * shader capabilities, so we use the shader capabilities to distinguish between FX and 6xxx/7xxx.
     
    19731976
    19741977    return CARD_NVIDIA_RIVA_TNT; /* Riva TNT, Vanta */
     1978#endif /* !VBOX_WITH_WDDM */
    19751979}
    19761980
     
    19781982        const char *gl_renderer)
    19791983{
     1984#ifndef VBOX_WITH_WDDM
    19801985    UINT d3d_level = d3d_level_from_gl_info(gl_info);
     1986#endif
    19811987
    19821988    /* See http://developer.amd.com/drivers/pc_vendor_id/Pages/default.aspx
     
    20732079    }
    20742080
     2081#ifndef VBOX_WITH_WDDM
    20752082    if (d3d_level >= 9)
    20762083    {
     
    21102117
    21112118    return PCI_DEVICE_NONE;
     2119#endif /*!VBOX_WITH_WDDM*/
    21122120}
    21132121
     
    26512659static void load_gl_funcs(struct wined3d_gl_info *gl_info)
    26522660{
    2653 #define USE_GL_FUNC(pfn) (*(PROC *)(&gl_info->gl_ops.ext.p_##pfn)) = wglGetProcAddress(#pfn);
     2661#define USE_GL_FUNC(pfn) (*(PROC *)&gl_info->gl_ops.ext.p_##pfn) = wglGetProcAddress(#pfn);
    26542662    GL_EXT_FUNCS_GEN;
    26552663#undef USE_GL_FUNC
     
    53435351        ALL_WGL_FUNCS
    53445352# undef USE_GL_FUNC
    5345         gl_info->gl_ops.wgl.p_wglSwapBuffers = (void *)GetProcAddress(mod_gl, "wglSwapBuffers");
     5353        *(FARPROC *)&gl_info->gl_ops.wgl.p_wglSwapBuffers = GetProcAddress(mod_gl, "wglSwapBuffers");
    53465354    }
    53475355#else
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/resource.c

    r48345 r63025  
    9999        )
    100100{
     101#ifndef VBOX_WITH_WDDM
    101102    const struct wined3d *d3d = device->wined3d;
     103#endif
    102104
    103105    resource->ref = 1;
     
    184186void resource_cleanup(struct wined3d_resource *resource)
    185187{
     188#ifndef VBOX_WITH_WDDM
    186189    const struct wined3d *d3d = resource->device->wined3d;
     190#endif
    187191    struct private_data *data;
    188192    struct list *e1, *e2;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/surface.c

    r52329 r63025  
    655655{
    656656    struct wined3d_device *device = surface->resource.device;
    657     const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
     657//    const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
    658658    DWORD alloc_flag = SFLAG_ALLOCATED;
    659659//    DWORD alloc_flag = srgb ? SFLAG_SRGBALLOCATED : SFLAG_ALLOCATED;
     
    749749            if (VBOXSHRC_IS_SHARED_OPENED(surface))
    750750            {
    751                 struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info;
     751                //struct wined3d_gl_info *gl_info = &surface->resource.device->adapter->gl_info;
    752752                ERR("should not be here!");
    753753                surface->texture_name = (GLuint)VBOXSHRC_GET_SHAREHANDLE(surface);
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/vboxext.c

    r63017 r63025  
    283283
    284284
    285 static HRESULT vboxExtInit()
     285static HRESULT vboxExtInit(void)
    286286{
    287287    HRESULT hr = S_OK;
     
    307307
    308308
    309 static HRESULT vboxExtWndCleanup();
    310 
    311 static HRESULT vboxExtTerm()
     309static HRESULT vboxExtWndCleanup(void);
     310
     311static HRESULT vboxExtTerm(void)
    312312{
    313313    HRESULT hr = vboxExtWndCleanup();
     
    502502#define VBOXEXTWND_NAME "VboxDispD3DWineWnd"
    503503
    504 static HRESULT vboxExtWndDoCleanup()
     504static HRESULT vboxExtWndDoCleanup(void)
    505505{
    506506    HRESULT hr = S_OK;
     
    685685}
    686686
    687 static HRESULT vboxExtWndCleanup()
     687static HRESULT vboxExtWndCleanup(void)
    688688{
    689689    HRESULT hr;
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_gl.h

    r63021 r63025  
    208208
    209209
    210 #define VBOX_USE_GL_FUNC(pfn) p##pfn = (void *)wglGetProcAddress(#pfn);
     210/* Right, we just have to do things our own way some undisclosed reason. sigh. */
     211#define VBOX_USE_GL_FUNC(pfn) (*(PROC *)&(p##pfn)) = wglGetProcAddress(#pfn);
    211212
    212213# define VBOX_GL_FUNCS_GEN \
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine_new/wined3d/wined3d_main.c

    r48345 r63025  
    340340            wined3d_settings.always_offscreen = FALSE;
    341341        }
    342         if (!get_config_key_dword(hkey, appkey, "MaxShaderModelVS", &wined3d_settings.max_sm_vs))
     342        if (!get_config_key_dword(hkey, appkey, "MaxShaderModelVS", (DWORD *)&wined3d_settings.max_sm_vs))
    343343            TRACE("Limiting VS shader model to %u.\n", wined3d_settings.max_sm_vs);
    344         if (!get_config_key_dword(hkey, appkey, "MaxShaderModelGS", &wined3d_settings.max_sm_gs))
     344        if (!get_config_key_dword(hkey, appkey, "MaxShaderModelGS", (DWORD *)&wined3d_settings.max_sm_gs))
    345345            TRACE("Limiting GS shader model to %u.\n", wined3d_settings.max_sm_gs);
    346         if (!get_config_key_dword(hkey, appkey, "MaxShaderModelPS", &wined3d_settings.max_sm_ps))
     346        if (!get_config_key_dword(hkey, appkey, "MaxShaderModelPS", (DWORD *)&wined3d_settings.max_sm_ps))
    347347            TRACE("Limiting PS shader model to %u.\n", wined3d_settings.max_sm_ps);
    348348        if (!get_config_key(hkey, appkey, "DirectDrawRenderer", buffer, size)
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