44 if (!
state->render_targets)
47 for (
i = 0;
i <
state->num_render_targets;
i++)
60 for (
i = 0;
i <
state->num_render_targets;
i++)
74 for (
i = 0;
i <
state->num_render_targets;
i++)
77 if (
state->render_targets[
i])
83 if (
state->depth_stencil)
96 for (
i = 0;
i <
state->num_render_targets;
i++)
98 if (
state->render_targets[
i])
137 IUnknown_AddRef(iface);
153 TRACE(
"%p increasing refcount to %lu.\n", iface,
ref);
163 TRACE(
"%p decreasing refcount to %lu.\n", iface,
ref);
201 TRACE(
"iface %p, desc %p.\n", iface,
desc);
219 DWORD multi_sample_quality = 0;
221 TRACE(
"iface %p, surface %p, viewport %p.\n", iface, surface, viewport);
233 if (viewport->
X >
render->desc.Width || viewport->
Y >
render->desc.Height
239 && (viewport->
X != 0 || viewport->
Y != 0
250 for (
i = 1;
i <
render->previous_state.num_render_targets;
i++)
262 render->desc.Format, multi_sample_type, multi_sample_quality,
FALSE,
270 if (
render->desc.DepthStencil)
273 render->desc.DepthStencilFormat, multi_sample_type, multi_sample_quality,
TRUE,
286 render->dst_surface = surface;
316 if (
render->render_target)
321 ERR(
"Copying render target data to surface failed, hr %#lx.\n",
hr);
327 if (
render->render_target)
333 if (
render->depth_stencil)
347 FIXME(
"iface %p stub!\n", iface);
353 FIXME(
"iface %p stub!\n", iface);
378 ID3DXRenderToSurface **
out)
383 TRACE(
"device %p, width %u, height %u, format %#x, depth_stencil %#x, depth_stencil_format %#x, out %p.\n",
398 render->desc.DepthStencilFormat = depth_stencil_format;
414 *
out = &
render->ID3DXRenderToSurface_iface;
457 ERR(
"Copying render target data to surface failed, hr %#lx.\n",
hr);
476 IUnknown_AddRef(iface);
492 TRACE(
"%p increasing refcount to %lu.\n", iface,
ref);
502 TRACE(
"%p decreasing refcount to %lu.\n", iface,
ref);
506 if (
render->dst_cube_texture)
541 TRACE(
"iface %p, desc %p.\n", iface,
desc);
550 IDirect3DCubeTexture9 *
texture)
575 if (
render->desc.DepthStencil)
589 if (
render->dst_cube_texture)
609 IDirect3DTexture9 *pos_z_texture,
610 IDirect3DTexture9 *neg_z_texture)
612 FIXME(
"iface %p, pos_z_texture %p, neg_z_texture %p stub!\n", iface, pos_z_texture, neg_z_texture);
617 IDirect3DTexture9 *pos_z_texture,
618 IDirect3DTexture9 *neg_z_texture)
620 FIXME(
"iface %p, pos_z_texture %p, neg_z_texture %p stub!\n", iface, pos_z_texture, neg_z_texture);
637 if (
render->render_target)
650 for (
i = 1;
i <
render->previous_device_state.num_render_targets;
i++)
653 if (!
render->render_target)
689 if (
render->render_target)
698 if (
render->render_target)
704 if (
render->depth_stencil)
719 FIXME(
"iface %p stub!\n", iface);
725 FIXME(
"iface %p stub!\n", iface);
754 ID3DXRenderToEnvMap **
out)
759 TRACE(
"(%p, %u, %u, %#x, %d, %#x, %p)\n",
device,
size, mip_levels,
775 render->desc.MipLevels = mip_levels;
778 render->desc.DepthStencilFormat = depth_stencil_format;
795 *
out = &
render->ID3DXRenderToEnvMap_iface;
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define D3DERR_INVALIDCALL
#define D3DUSAGE_RENDERTARGET
enum _D3DFORMAT D3DFORMAT
enum _D3DCUBEMAP_FACES D3DCUBEMAP_FACES
enum _D3DMULTISAMPLE_TYPE D3DMULTISAMPLE_TYPE
#define IDirect3DDevice9_EndScene(p)
#define IDirect3DDevice9_BeginScene(p)
#define IDirect3DCubeTexture9_AddRef(p)
#define IDirect3DDevice9_SetViewport(p, a)
#define IDirect3DDevice9_SetRenderTarget(p, a, b)
#define IDirect3DCubeTexture9_Release(p)
#define IDirect3DDevice9_SetDepthStencilSurface(p, a)
#define IDirect3DDevice9_CreateDepthStencilSurface(p, a, b, c, d, e, f, g, h)
#define IDirect3DDevice9_GetDeviceCaps(p, a)
#define IDirect3DDevice9_GetViewport(p, a)
#define IDirect3DSurface9_AddRef(p)
#define IDirect3DCubeTexture9_GetLevelDesc(p, a, b)
#define IDirect3DSurface9_GetDesc(p, a)
#define IDirect3DDevice9_Release(p)
#define IDirect3DDevice9_GetDepthStencilSurface(p, a)
#define IDirect3DSurface9_Release(p)
#define IDirect3DCubeTexture9_GetCubeMapSurface(p, a, b, c)
#define IDirect3DDevice9_AddRef(p)
#define IDirect3DDevice9_CreateRenderTarget(p, a, b, c, d, e, f, g, h)
#define IDirect3DDevice9_GetRenderTarget(p, a, b)
static struct render_to_envmap * impl_from_ID3DXRenderToEnvMap(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToSurface_OnLostDevice(ID3DXRenderToSurface *iface)
static HRESULT WINAPI D3DXRenderToSurface_BeginScene(ID3DXRenderToSurface *iface, IDirect3DSurface9 *surface, const D3DVIEWPORT9 *viewport)
static ULONG WINAPI D3DXRenderToSurface_Release(ID3DXRenderToSurface *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_OnLostDevice(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_Face(ID3DXRenderToEnvMap *iface, D3DCUBEMAP_FACES face, DWORD filter)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginHemisphere(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *pos_z_texture, IDirect3DTexture9 *neg_z_texture)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginParabolic(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *pos_z_texture, IDirect3DTexture9 *neg_z_texture)
static HRESULT WINAPI D3DXRenderToEnvMap_GetDesc(ID3DXRenderToEnvMap *iface, D3DXRTE_DESC *desc)
static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface, DWORD filter)
static HRESULT WINAPI D3DXRenderToSurface_OnResetDevice(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToSurface_AddRef(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToEnvMap_AddRef(ID3DXRenderToEnvMap *iface)
HRESULT WINAPI D3DXCreateRenderToEnvMap(IDirect3DDevice9 *device, UINT size, UINT mip_levels, D3DFORMAT format, BOOL depth_stencil, D3DFORMAT depth_stencil_format, ID3DXRenderToEnvMap **out)
static const ID3DXRenderToSurfaceVtbl render_to_surface_vtbl
static void device_state_capture(IDirect3DDevice9 *device, struct device_state *state)
static struct render_to_surface * impl_from_ID3DXRenderToSurface(ID3DXRenderToSurface *iface)
static ULONG WINAPI D3DXRenderToEnvMap_Release(ID3DXRenderToEnvMap *iface)
static HRESULT WINAPI D3DXRenderToEnvMap_QueryInterface(ID3DXRenderToEnvMap *iface, REFIID riid, void **out)
static HRESULT WINAPI D3DXRenderToEnvMap_GetDevice(ID3DXRenderToEnvMap *iface, IDirect3DDevice9 **device)
static HRESULT WINAPI D3DXRenderToSurface_GetDevice(ID3DXRenderToSurface *iface, IDirect3DDevice9 **device)
HRESULT WINAPI D3DXCreateRenderToSurface(IDirect3DDevice9 *device, UINT width, UINT height, D3DFORMAT format, BOOL depth_stencil, D3DFORMAT depth_stencil_format, ID3DXRenderToSurface **out)
static HRESULT device_state_init(IDirect3DDevice9 *device, struct device_state *state)
static HRESULT WINAPI D3DXRenderToSurface_QueryInterface(ID3DXRenderToSurface *iface, REFIID riid, void **out)
static void device_state_restore(IDirect3DDevice9 *device, struct device_state *state)
static void copy_render_target_to_cube_texture_face(IDirect3DCubeTexture9 *cube_texture, D3DCUBEMAP_FACES face, IDirect3DSurface9 *render_target, DWORD filter)
static void device_state_release(struct device_state *state)
static HRESULT WINAPI D3DXRenderToSurface_GetDesc(ID3DXRenderToSurface *iface, D3DXRTS_DESC *desc)
static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface, DWORD filter)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginSphere(ID3DXRenderToEnvMap *iface, IDirect3DTexture9 *texture)
static HRESULT WINAPI D3DXRenderToEnvMap_BeginCube(ID3DXRenderToEnvMap *iface, IDirect3DCubeTexture9 *texture)
static const ID3DXRenderToEnvMapVtbl render_to_envmap_vtbl
static HRESULT WINAPI D3DXRenderToEnvMap_OnResetDevice(ID3DXRenderToEnvMap *iface)
HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, const PALETTEENTRY *palette, UINT srclevel, DWORD filter)
HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
static void cleanup(void)
static void depth_stencil(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLuint GLint GLenum face
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
D3D11_SHADER_VARIABLE_DESC desc
#define IsEqualGUID(rguid1, rguid2)
D3DMULTISAMPLE_TYPE MultiSampleType
IDirect3DSurface9 * render_target
IDirect3DSurface9 * depth_stencil
IDirect3DSurface9 ** render_targets
IDirect3DSurface9 * render_target
IDirect3DDevice9 * device
struct device_state previous_device_state
IDirect3DCubeTexture9 * dst_cube_texture
ID3DXRenderToEnvMap ID3DXRenderToEnvMap_iface
IDirect3DSurface9 * depth_stencil
IDirect3DSurface9 * depth_stencil
ID3DXRenderToSurface ID3DXRenderToSurface_iface
IDirect3DDevice9 * device
IDirect3DSurface9 * dst_surface
struct device_state previous_state
IDirect3DSurface9 * render_target
#define CONTAINING_RECORD(address, type, field)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out