wined3d: Request per-surface palettes in the client libs.
This commit is contained in:
parent
b296f181dd
commit
c461d312ba
|
@ -45,7 +45,7 @@ IDirect3D8* WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT SDKVersion) {
|
|||
|
||||
object->IDirect3D8_iface.lpVtbl = &Direct3D8_Vtbl;
|
||||
object->ref = 1;
|
||||
object->WineD3D = wined3d_create(8, &object->IDirect3D8_iface);
|
||||
object->WineD3D = wined3d_create(8, 0, &object->IDirect3D8_iface);
|
||||
|
||||
TRACE("Created Direct3D object @ %p, WineObj @ %p\n", object, object->WineD3D);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ IDirect3D9* WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT SDKVersion) {
|
|||
object->ref = 1;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
object->WineD3D = wined3d_create(9, object);
|
||||
object->WineD3D = wined3d_create(9, 0, object);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D);
|
||||
|
|
|
@ -6034,7 +6034,7 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type)
|
|||
ddraw->orig_width = GetSystemMetrics(SM_CXSCREEN);
|
||||
ddraw->orig_height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
ddraw->wineD3D = wined3d_create(7, &ddraw->IDirectDraw7_iface);
|
||||
ddraw->wineD3D = wined3d_create(7, WINED3D_PALETTE_PER_SURFACE, &ddraw->IDirectDraw7_iface);
|
||||
if (!ddraw->wineD3D)
|
||||
{
|
||||
WARN("Failed to create a wined3d object.\n");
|
||||
|
|
|
@ -303,7 +303,7 @@ HRESULT dxgi_factory_init(struct dxgi_factory *factory)
|
|||
factory->refcount = 1;
|
||||
|
||||
EnterCriticalSection(&dxgi_cs);
|
||||
factory->wined3d = wined3d_create(10, factory);
|
||||
factory->wined3d = wined3d_create(10, 0, factory);
|
||||
if (!factory->wined3d)
|
||||
{
|
||||
LeaveCriticalSection(&dxgi_cs);
|
||||
|
|
|
@ -5370,11 +5370,12 @@ const struct wined3d_parent_ops wined3d_null_parent_ops =
|
|||
};
|
||||
|
||||
/* Do not call while under the GL lock. */
|
||||
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent)
|
||||
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, DWORD flags, void *parent)
|
||||
{
|
||||
wined3d->dxVersion = version;
|
||||
wined3d->ref = 1;
|
||||
wined3d->parent = parent;
|
||||
wined3d->flags = flags;
|
||||
|
||||
if (!InitAdapters(wined3d))
|
||||
{
|
||||
|
|
|
@ -4260,10 +4260,8 @@ void d3dfmt_p8_init_palette(struct wined3d_surface *surface, BYTE table[256][4],
|
|||
|
||||
if (!pal)
|
||||
{
|
||||
UINT dxVersion = device->wined3d->dxVersion;
|
||||
|
||||
/* In DirectDraw the palette is a property of the surface, there are no such things as device palettes. */
|
||||
if (dxVersion <= 7)
|
||||
if (device->wined3d->flags & WINED3D_PALETTE_PER_SURFACE)
|
||||
{
|
||||
ERR("This code should never get entered for DirectDraw!, expect problems\n");
|
||||
if (index_in_alpha)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@ cdecl wined3d_check_device_format_conversion(ptr long long long long)
|
||||
@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr)
|
||||
@ cdecl wined3d_check_device_type(ptr long long long long long)
|
||||
@ cdecl wined3d_create(long ptr)
|
||||
@ cdecl wined3d_create(long long ptr)
|
||||
@ cdecl wined3d_decref(ptr)
|
||||
@ cdecl wined3d_enum_adapter_modes(ptr long long long ptr)
|
||||
@ cdecl wined3d_get_adapter_count(ptr)
|
||||
|
|
|
@ -88,7 +88,7 @@ struct wined3d_settings wined3d_settings =
|
|||
};
|
||||
|
||||
/* Do not call while under the GL lock. */
|
||||
struct wined3d * CDECL wined3d_create(UINT version, void *parent)
|
||||
struct wined3d * CDECL wined3d_create(UINT version, DWORD flags, void *parent)
|
||||
{
|
||||
struct wined3d *object;
|
||||
HRESULT hr;
|
||||
|
@ -100,7 +100,7 @@ struct wined3d * CDECL wined3d_create(UINT version, void *parent)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
hr = wined3d_init(object, version, parent);
|
||||
hr = wined3d_init(object, version, flags, parent);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
WARN("Failed to initialize wined3d object, hr %#x.\n", hr);
|
||||
|
|
|
@ -1634,12 +1634,13 @@ struct wined3d
|
|||
{
|
||||
LONG ref;
|
||||
void *parent;
|
||||
DWORD flags;
|
||||
UINT dxVersion;
|
||||
UINT adapter_count;
|
||||
struct wined3d_adapter adapters[1];
|
||||
};
|
||||
|
||||
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, void *parent) DECLSPEC_HIDDEN;
|
||||
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, DWORD flags, void *parent) DECLSPEC_HIDDEN;
|
||||
BOOL wined3d_register_window(HWND window, struct wined3d_device *device) DECLSPEC_HIDDEN;
|
||||
void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -1235,6 +1235,8 @@ enum wined3d_sysval_semantic
|
|||
#define WINED3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000
|
||||
#define WINED3DDEVCAPS_NPATCHES 0x01000000
|
||||
|
||||
#define WINED3D_PALETTE_PER_SURFACE 0x00000001
|
||||
|
||||
/* dwDDFX */
|
||||
/* arithmetic stretching along y axis */
|
||||
#define WINEDDBLTFX_ARITHSTRETCHY 0x00000001
|
||||
|
@ -2125,7 +2127,7 @@ HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wine
|
|||
HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
WINED3DDEVTYPE device_type, enum wined3d_format_id display_format_id,
|
||||
enum wined3d_format_id backbuffer_format_id, BOOL windowed);
|
||||
struct wined3d * __cdecl wined3d_create(UINT dxVersion, void *parent);
|
||||
struct wined3d * __cdecl wined3d_create(UINT dxVersion, DWORD flags, void *parent);
|
||||
ULONG __cdecl wined3d_decref(struct wined3d *wined3d);
|
||||
HRESULT __cdecl wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
enum wined3d_format_id format_id, UINT mode_idx, WINED3DDISPLAYMODE *mode);
|
||||
|
|
Loading…
Reference in New Issue