wined3d: Move valid_rt_mask to wined3d_d3d_info.
This commit is contained in:
parent
cb01fb27b1
commit
ac99d53991
|
@ -2282,7 +2282,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
||||||
else if (!context->render_offscreen) return context_generate_rt_mask_from_surface(rts[0]);
|
else if (!context->render_offscreen) return context_generate_rt_mask_from_surface(rts[0]);
|
||||||
|
|
||||||
rt_mask = ps ? ps->reg_maps.rt_mask : 1;
|
rt_mask = ps ? ps->reg_maps.rt_mask : 1;
|
||||||
rt_mask &= device->valid_rt_mask;
|
rt_mask &= context->d3d_info->valid_rt_mask;
|
||||||
rt_mask_bits = rt_mask;
|
rt_mask_bits = rt_mask;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (rt_mask_bits)
|
while (rt_mask_bits)
|
||||||
|
|
|
@ -1111,7 +1111,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||||
struct wined3d_context *context;
|
struct wined3d_context *context;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
DWORD state;
|
DWORD state;
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
TRACE("device %p, swapchain_desc %p.\n", device, swapchain_desc);
|
TRACE("device %p, swapchain_desc %p.\n", device, swapchain_desc);
|
||||||
|
|
||||||
|
@ -1120,9 +1119,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device,
|
||||||
if (device->wined3d->flags & WINED3D_NO3D)
|
if (device->wined3d->flags & WINED3D_NO3D)
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
|
|
||||||
device->valid_rt_mask = 0;
|
|
||||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
|
||||||
device->valid_rt_mask |= (1 << i);
|
|
||||||
device->fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
device->fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||||
sizeof(*device->fb.render_targets) * gl_info->limits.buffers);
|
sizeof(*device->fb.render_targets) * gl_info->limits.buffers);
|
||||||
|
|
||||||
|
|
|
@ -2632,6 +2632,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
||||||
enum wined3d_pci_device device;
|
enum wined3d_pci_device device;
|
||||||
DWORD gl_version;
|
DWORD gl_version;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
TRACE("adapter %p.\n", adapter);
|
TRACE("adapter %p.\n", adapter);
|
||||||
|
|
||||||
|
@ -2935,6 +2936,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
||||||
gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] =
|
gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] =
|
||||||
gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT;
|
gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT;
|
||||||
|
|
||||||
|
adapter->d3d_info.valid_rt_mask = 0;
|
||||||
|
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||||
|
adapter->d3d_info.valid_rt_mask |= (1 << i);
|
||||||
|
|
||||||
fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device);
|
fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device);
|
||||||
init_driver_info(driver_info, card_vendor, device);
|
init_driver_info(driver_info, card_vendor, device);
|
||||||
add_gl_compat_wrappers(gl_info);
|
add_gl_compat_wrappers(gl_info);
|
||||||
|
|
|
@ -1599,6 +1599,7 @@ struct wined3d_d3d_info
|
||||||
{
|
{
|
||||||
struct wined3d_d3d_limits limits;
|
struct wined3d_d3d_limits limits;
|
||||||
BOOL vs_clipping;
|
BOOL vs_clipping;
|
||||||
|
DWORD valid_rt_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The adapter structure */
|
/* The adapter structure */
|
||||||
|
@ -1771,7 +1772,6 @@ struct wined3d_device
|
||||||
struct list shaders; /* a linked list to track shaders (pixel and vertex) */
|
struct list shaders; /* a linked list to track shaders (pixel and vertex) */
|
||||||
|
|
||||||
/* Render Target Support */
|
/* Render Target Support */
|
||||||
DWORD valid_rt_mask;
|
|
||||||
struct wined3d_fb_state fb;
|
struct wined3d_fb_state fb;
|
||||||
struct wined3d_surface *onscreen_depth_stencil;
|
struct wined3d_surface *onscreen_depth_stencil;
|
||||||
struct wined3d_surface *auto_depth_stencil;
|
struct wined3d_surface *auto_depth_stencil;
|
||||||
|
|
Loading…
Reference in New Issue