Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
00a5f385
Commit
00a5f385
authored
May 10, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove object creation methods from the IWineD3DDevice interface.
parent
5e4145d0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
824 additions
and
117 deletions
+824
-117
buffer.c
dlls/d3d10core/buffer.c
+2
-2
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-1
device.c
dlls/d3d10core/device.c
+2
-2
inputlayout.c
dlls/d3d10core/inputlayout.c
+1
-1
shader.c
dlls/d3d10core/shader.c
+3
-3
texture.c
dlls/d3d10core/texture.c
+2
-2
view.c
dlls/d3d10core/view.c
+2
-3
buffer.c
dlls/d3d8/buffer.c
+2
-2
cubetexture.c
dlls/d3d8/cubetexture.c
+1
-1
device.c
dlls/d3d8/device.c
+1
-1
shader.c
dlls/d3d8/shader.c
+2
-2
surface.c
dlls/d3d8/surface.c
+1
-1
swapchain.c
dlls/d3d8/swapchain.c
+1
-1
texture.c
dlls/d3d8/texture.c
+1
-1
vertexdeclaration.c
dlls/d3d8/vertexdeclaration.c
+2
-2
volume.c
dlls/d3d8/volume.c
+1
-1
volumetexture.c
dlls/d3d8/volumetexture.c
+1
-1
buffer.c
dlls/d3d9/buffer.c
+2
-2
cubetexture.c
dlls/d3d9/cubetexture.c
+1
-1
query.c
dlls/d3d9/query.c
+1
-1
shader.c
dlls/d3d9/shader.c
+2
-2
stateblock.c
dlls/d3d9/stateblock.c
+1
-1
surface.c
dlls/d3d9/surface.c
+1
-1
swapchain.c
dlls/d3d9/swapchain.c
+1
-1
texture.c
dlls/d3d9/texture.c
+1
-1
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+1
-1
volume.c
dlls/d3d9/volume.c
+1
-1
volumetexture.c
dlls/d3d9/volumetexture.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+3
-3
device.c
dlls/ddraw/device.c
+3
-3
palette.c
dlls/ddraw/palette.c
+1
-1
surface.c
dlls/ddraw/surface.c
+3
-3
vertexbuffer.c
dlls/ddraw/vertexbuffer.c
+1
-1
swapchain.c
dlls/dxgi/swapchain.c
+1
-1
buffer.c
dlls/wined3d/buffer.c
+112
-1
device.c
dlls/wined3d/device.c
+0
-0
palette.c
dlls/wined3d/palette.c
+32
-1
query.c
dlls/wined3d/query.c
+31
-1
shader.c
dlls/wined3d/shader.c
+105
-3
stateblock.c
dlls/wined3d/stateblock.c
+33
-1
surface.c
dlls/wined3d/surface.c
+45
-2
swapchain.c
dlls/wined3d/swapchain.c
+35
-1
texture.c
dlls/wined3d/texture.c
+114
-3
vertexdeclaration.c
dlls/wined3d/vertexdeclaration.c
+189
-1
view.c
dlls/wined3d/view.c
+24
-1
volume.c
dlls/wined3d/volume.c
+35
-1
wined3d.spec
dlls/wined3d/wined3d.spec
+18
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-49
wined3d.idl
include/wine/wined3d.idl
+0
-0
No files found.
dlls/d3d10core/buffer.c
View file @
00a5f385
...
...
@@ -204,8 +204,8 @@ HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d10_device *devi
wined3d_desc
.
cpu_access_flags
=
desc
->
CPUAccessFlags
;
wined3d_desc
.
misc_flags
=
desc
->
MiscFlags
;
hr
=
IWineD3DDevice_CreateBuffer
(
device
->
wined3d_device
,
&
wined3d_desc
,
data
?
data
->
pSysMem
:
NULL
,
(
IUnknown
*
)
buffer
,
&
d3d10_buffer_wined3d_parent_ops
,
hr
=
wined3d_buffer_create
(
device
->
wined3d_device
,
&
wined3d_desc
,
data
?
data
->
pSysMem
:
NULL
,
buffer
,
&
d3d10_buffer_wined3d_parent_ops
,
&
buffer
->
wined3d_buffer
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d10core/d3d10core_private.h
View file @
00a5f385
...
...
@@ -138,7 +138,7 @@ struct d3d10_rendertarget_view
D3D10_RENDER_TARGET_VIEW_DESC
desc
;
};
HRESULT
d3d10_rendertarget_view_init
(
struct
d3d10_rendertarget_view
*
view
,
struct
d3d10_device
*
device
,
HRESULT
d3d10_rendertarget_view_init
(
struct
d3d10_rendertarget_view
*
view
,
ID3D10Resource
*
resource
,
const
D3D10_RENDER_TARGET_VIEW_DESC
*
desc
)
DECLSPEC_HIDDEN
;
/* ID3D10ShaderResourceView */
...
...
dlls/d3d10core/device.c
View file @
00a5f385
...
...
@@ -760,7 +760,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic
return
E_OUTOFMEMORY
;
}
hr
=
d3d10_rendertarget_view_init
(
object
,
(
struct
d3d10_device
*
)
iface
,
resource
,
desc
);
hr
=
d3d10_rendertarget_view_init
(
object
,
resource
,
desc
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize rendertarget view, hr %#x.
\n
"
,
hr
);
...
...
@@ -1453,7 +1453,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateVolume(IWineD3DDeviceParent
TRACE
(
"iface %p, container_parent %p, width %u, height %u, depth %u, format %#x, pool %#x, usage %#x, volume %p.
\n
"
,
iface
,
container_parent
,
width
,
height
,
depth
,
format
,
pool
,
usage
,
volume
);
hr
=
IWineD3DDevice_CreateVolum
e
(
device_from_device_parent
(
iface
)
->
wined3d_device
,
hr
=
wined3d_volume_creat
e
(
device_from_device_parent
(
iface
)
->
wined3d_device
,
width
,
height
,
depth
,
usage
,
format
,
pool
,
NULL
,
&
d3d10_subresource_parent_ops
,
volume
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d10core/inputlayout.c
View file @
00a5f385
...
...
@@ -227,7 +227,7 @@ HRESULT d3d10_input_layout_init(struct d3d10_input_layout *layout, struct d3d10_
return
hr
;
}
hr
=
IWineD3DDevice_CreateVertexDeclaration
(
device
->
wined3d_device
,
wined3d_elements
,
wined3d_element_count
,
hr
=
wined3d_vertex_declaration_create
(
device
->
wined3d_device
,
wined3d_elements
,
wined3d_element_count
,
layout
,
&
d3d10_input_layout_wined3d_parent_ops
,
&
layout
->
wined3d_decl
);
HeapFree
(
GetProcessHeap
(),
0
,
wined3d_elements
);
if
(
FAILED
(
hr
))
...
...
dlls/d3d10core/shader.c
View file @
00a5f385
...
...
@@ -255,7 +255,7 @@ HRESULT d3d10_vertex_shader_init(struct d3d10_vertex_shader *shader, struct d3d1
return
hr
;
}
hr
=
IWineD3DDevice_CreateVertexShader
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
hr
=
wined3d_shader_create_vs
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
&
shader
->
output_signature
,
shader
,
&
d3d10_vertex_shader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
if
(
FAILED
(
hr
))
{
...
...
@@ -387,7 +387,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct
return
hr
;
}
hr
=
IWineD3DDevice_CreateGeometryShader
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
hr
=
wined3d_shader_create_gs
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
&
shader
->
output_signature
,
shader
,
&
d3d10_geometry_shader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
if
(
FAILED
(
hr
))
{
...
...
@@ -522,7 +522,7 @@ HRESULT d3d10_pixel_shader_init(struct d3d10_pixel_shader *shader, struct d3d10_
return
hr
;
}
hr
=
IWineD3DDevice_CreatePixelShader
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
hr
=
wined3d_shader_create_ps
(
device
->
wined3d_device
,
shader_info
.
shader_code
,
&
shader
->
output_signature
,
shader
,
&
d3d10_pixel_shader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d10core/texture.c
View file @
00a5f385
...
...
@@ -230,7 +230,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic
FIXME
(
"Implement DXGI<->wined3d usage conversion
\n
"
);
hr
=
IWineD3DDevice_CreateSurfac
e
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
hr
=
wined3d_surface_creat
e
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
FALSE
,
FALSE
,
0
,
desc
->
Usage
,
WINED3DPOOL_DEFAULT
,
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3DMULTISAMPLE_NONE
,
desc
->
SampleDesc
.
Quality
,
SURFACE_OPENGL
,
texture
,
&
d3d10_texture2d_wined3d_parent_ops
,
...
...
@@ -436,7 +436,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic
FIXME
(
"Implement DXGI<->wined3d usage conversion.
\n
"
);
hr
=
IWineD3DDevice_CreateVolumeTexture
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
desc
->
Depth
,
hr
=
wined3d_texture_create_3d
(
device
->
wined3d_device
,
desc
->
Width
,
desc
->
Height
,
desc
->
Depth
,
desc
->
MipLevels
,
desc
->
Usage
,
wined3dformat_from_dxgi_format
(
desc
->
Format
),
WINED3DPOOL_DEFAULT
,
texture
,
&
d3d10_texture3d_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
if
(
FAILED
(
hr
))
...
...
dlls/d3d10core/view.c
View file @
00a5f385
...
...
@@ -427,7 +427,7 @@ static const struct ID3D10RenderTargetViewVtbl d3d10_rendertarget_view_vtbl =
d3d10_rendertarget_view_GetDesc
,
};
HRESULT
d3d10_rendertarget_view_init
(
struct
d3d10_rendertarget_view
*
view
,
struct
d3d10_device
*
device
,
HRESULT
d3d10_rendertarget_view_init
(
struct
d3d10_rendertarget_view
*
view
,
ID3D10Resource
*
resource
,
const
D3D10_RENDER_TARGET_VIEW_DESC
*
desc
)
{
struct
wined3d_resource
*
wined3d_resource
;
...
...
@@ -453,8 +453,7 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, struc
return
E_FAIL
;
}
hr
=
IWineD3DDevice_CreateRendertargetView
(
device
->
wined3d_device
,
wined3d_resource
,
(
IUnknown
*
)
view
,
&
view
->
wined3d_view
);
hr
=
wined3d_rendertarget_view_create
(
wined3d_resource
,
view
,
&
view
->
wined3d_view
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a wined3d rendertarget view, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d8/buffer.c
View file @
00a5f385
...
...
@@ -270,7 +270,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer8Impl *buffer, IDirect3DDevice8Im
buffer
->
fvf
=
fvf
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
hr
=
wined3d_buffer_create_vb
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d8_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -533,7 +533,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer8Impl *buffer, IDirect3DDevice8Impl
buffer
->
format
=
wined3dformat_from_d3dformat
(
format
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateIndexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
hr
=
wined3d_buffer_create_ib
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d8_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d8/cubetexture.c
View file @
00a5f385
...
...
@@ -425,7 +425,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture8Impl *texture, IDirect3DDevice8Imp
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateCubeTextur
e
(
device
->
WineD3DDevice
,
edge_length
,
levels
,
hr
=
wined3d_texture_create_cub
e
(
device
->
WineD3DDevice
,
edge_length
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d8_cubetexture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/d3d8/device.c
View file @
00a5f385
...
...
@@ -1671,7 +1671,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *if
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateStateBlock
(
This
->
WineD3DDevice
,
(
WINED3DSTATEBLOCKTYPE
)
Type
,
&
stateblock
);
hr
=
wined3d_stateblock_create
(
This
->
WineD3DDevice
,
(
WINED3DSTATEBLOCKTYPE
)
Type
,
&
stateblock
);
if
(
FAILED
(
hr
))
{
wined3d_mutex_unlock
();
...
...
dlls/d3d8/shader.c
View file @
00a5f385
...
...
@@ -176,7 +176,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im
if
(
usage
)
FIXME
(
"Usage %#x not implemented.
\n
"
,
usage
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
/* output signature */
,
hr
=
wined3d_shader_create_vs
(
device
->
WineD3DDevice
,
byte_code
,
NULL
/* output signature */
,
shader
,
&
d3d8_vertexshader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -277,7 +277,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl
shader
->
handle
=
shader_handle
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreatePixelShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
hr
=
wined3d_shader_create_ps
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
&
d3d8_pixelshader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d8/surface.c
View file @
00a5f385
...
...
@@ -304,7 +304,7 @@ HRESULT surface_init(IDirect3DSurface8Impl *surface, IDirect3DDevice8Impl *devic
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateSurfac
e
(
device
->
WineD3DDevice
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
hr
=
wined3d_surface_creat
e
(
device
->
WineD3DDevice
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
lockable
,
discard
,
level
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
multisample_type
,
multisample_quality
,
SURFACE_OPENGL
,
surface
,
&
d3d8_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
...
...
dlls/d3d8/swapchain.c
View file @
00a5f385
...
...
@@ -174,7 +174,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
wined3d_parameters
.
AutoRestoreDisplayMode
=
TRUE
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateSwapChain
(
device
->
WineD3DDevice
,
&
wined3d_parameters
,
hr
=
wined3d_swapchain_create
(
device
->
WineD3DDevice
,
&
wined3d_parameters
,
SURFACE_OPENGL
,
swapchain
,
&
d3d8_swapchain_wined3d_parent_ops
,
&
swapchain
->
wined3d_swapchain
);
wined3d_mutex_unlock
();
...
...
dlls/d3d8/texture.c
View file @
00a5f385
...
...
@@ -413,7 +413,7 @@ HRESULT texture_init(IDirect3DTexture8Impl *texture, IDirect3DDevice8Impl *devic
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateTexture
(
device
->
WineD3DDevice
,
width
,
height
,
levels
,
hr
=
wined3d_texture_create_2d
(
device
->
WineD3DDevice
,
width
,
height
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d8_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/d3d8/vertexdeclaration.c
View file @
00a5f385
...
...
@@ -400,7 +400,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration8Impl *declaration,
memcpy
(
declaration
->
elements
,
elements
,
declaration
->
elements_size
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexDeclaration
(
device
->
WineD3DDevice
,
wined3d_elements
,
wined3d_element_count
,
hr
=
wined3d_vertex_declaration_create
(
device
->
WineD3DDevice
,
wined3d_elements
,
wined3d_element_count
,
declaration
,
&
d3d8_vertexdeclaration_wined3d_parent_ops
,
&
declaration
->
wined3d_vertex_declaration
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
wined3d_elements
);
...
...
@@ -425,7 +425,7 @@ HRESULT vertexdeclaration_init_fvf(IDirect3DVertexDeclaration8Impl *declaration,
declaration
->
elements_size
=
0
;
declaration
->
shader_handle
=
fvf
;
hr
=
IWineD3DDevice_CreateVertexDeclarationFromFVF
(
device
->
WineD3DDevice
,
fvf
,
declaration
,
hr
=
wined3d_vertex_declaration_create_from_fvf
(
device
->
WineD3DDevice
,
fvf
,
declaration
,
&
d3d8_vertexdeclaration_wined3d_parent_ops
,
&
declaration
->
wined3d_vertex_declaration
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/volume.c
View file @
00a5f385
...
...
@@ -277,7 +277,7 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device,
volume
->
IDirect3DVolume8_iface
.
lpVtbl
=
&
Direct3DVolume8_Vtbl
;
volume
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateVolum
e
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
,
hr
=
wined3d_volume_creat
e
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
,
format
,
pool
,
volume
,
&
d3d8_volume_wined3d_parent_ops
,
&
volume
->
wined3d_volume
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d8/volumetexture.c
View file @
00a5f385
...
...
@@ -401,7 +401,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture8Impl *texture, IDirect3DDevice
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVolumeTexture
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
levels
,
hr
=
wined3d_texture_create_3d
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d8_volumetexture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/buffer.c
View file @
00a5f385
...
...
@@ -272,7 +272,7 @@ HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Im
buffer
->
fvf
=
fvf
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
hr
=
wined3d_buffer_create_vb
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d9_vertexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -535,7 +535,7 @@ HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl
buffer
->
format
=
wined3dformat_from_d3dformat
(
format
);
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateIndexBuffer
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
hr
=
wined3d_buffer_create_ib
(
device
->
WineD3DDevice
,
size
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
buffer
,
&
d3d9_indexbuffer_wined3d_parent_ops
,
&
buffer
->
wineD3DIndexBuffer
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/cubetexture.c
View file @
00a5f385
...
...
@@ -470,7 +470,7 @@ HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Imp
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateCubeTextur
e
(
device
->
WineD3DDevice
,
edge_length
,
hr
=
wined3d_texture_create_cub
e
(
device
->
WineD3DDevice
,
edge_length
,
levels
,
usage
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d9_cubetexture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/query.c
View file @
00a5f385
...
...
@@ -171,7 +171,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D
query
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateQuery
(
device
->
WineD3DDevice
,
type
,
&
query
->
wineD3DQuery
);
hr
=
wined3d_query_create
(
device
->
WineD3DDevice
,
type
,
&
query
->
wineD3DQuery
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/shader.c
View file @
00a5f385
...
...
@@ -135,7 +135,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
shader
->
lpVtbl
=
&
d3d9_vertexshader_vtbl
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
hr
=
wined3d_shader_create_vs
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
&
d3d9_vertexshader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
@@ -262,7 +262,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl
shader
->
lpVtbl
=
&
d3d9_pixelshader_vtbl
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreatePixelShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
hr
=
wined3d_shader_create_ps
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
&
d3d9_pixelshader_wined3d_parent_ops
,
&
shader
->
wined3d_shader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/stateblock.c
View file @
00a5f385
...
...
@@ -149,7 +149,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im
else
{
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateStateBlock
(
device
->
WineD3DDevice
,
hr
=
wined3d_stateblock_create
(
device
->
WineD3DDevice
,
(
WINED3DSTATEBLOCKTYPE
)
type
,
&
stateblock
->
wined3d_stateblock
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/surface.c
View file @
00a5f385
...
...
@@ -392,7 +392,7 @@ HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *devic
}
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateSurfac
e
(
device
->
WineD3DDevice
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
hr
=
wined3d_surface_creat
e
(
device
->
WineD3DDevice
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
lockable
,
discard
,
level
,
usage
&
WINED3DUSAGE_MASK
,
(
WINED3DPOOL
)
pool
,
multisample_type
,
multisample_quality
,
SURFACE_OPENGL
,
surface
,
&
d3d9_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/swapchain.c
View file @
00a5f385
...
...
@@ -259,7 +259,7 @@ HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl
wined3d_parameters
.
AutoRestoreDisplayMode
=
TRUE
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateSwapChain
(
device
->
WineD3DDevice
,
&
wined3d_parameters
,
hr
=
wined3d_swapchain_create
(
device
->
WineD3DDevice
,
&
wined3d_parameters
,
SURFACE_OPENGL
,
swapchain
,
&
d3d9_swapchain_wined3d_parent_ops
,
&
swapchain
->
wined3d_swapchain
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/texture.c
View file @
00a5f385
...
...
@@ -457,7 +457,7 @@ HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *devic
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateTexture
(
device
->
WineD3DDevice
,
width
,
height
,
levels
,
hr
=
wined3d_texture_create_2d
(
device
->
WineD3DDevice
,
width
,
height
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d9_texture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/vertexdeclaration.c
View file @
00a5f385
...
...
@@ -395,7 +395,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
declaration
->
element_count
=
element_count
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVertexDeclaration
(
device
->
WineD3DDevice
,
wined3d_elements
,
wined3d_element_count
,
hr
=
wined3d_vertex_declaration_create
(
device
->
WineD3DDevice
,
wined3d_elements
,
wined3d_element_count
,
declaration
,
&
d3d9_vertexdeclaration_wined3d_parent_ops
,
&
declaration
->
wineD3DVertexDeclaration
);
wined3d_mutex_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
wined3d_elements
);
...
...
dlls/d3d9/volume.c
View file @
00a5f385
...
...
@@ -275,7 +275,7 @@ HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device,
volume
->
IDirect3DVolume9_iface
.
lpVtbl
=
&
Direct3DVolume9_Vtbl
;
volume
->
ref
=
1
;
hr
=
IWineD3DDevice_CreateVolum
e
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
&
WINED3DUSAGE_MASK
,
hr
=
wined3d_volume_creat
e
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
usage
&
WINED3DUSAGE_MASK
,
format
,
pool
,
volume
,
&
d3d9_volume_wined3d_parent_ops
,
&
volume
->
wined3d_volume
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/volumetexture.c
View file @
00a5f385
...
...
@@ -443,7 +443,7 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice
texture
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateVolumeTexture
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
levels
,
hr
=
wined3d_texture_create_3d
(
device
->
WineD3DDevice
,
width
,
height
,
depth
,
levels
,
usage
&
WINED3DUSAGE_MASK
,
wined3dformat_from_d3dformat
(
format
),
pool
,
texture
,
&
d3d9_volumetexture_wined3d_parent_ops
,
&
texture
->
wined3d_texture
);
wined3d_mutex_unlock
();
...
...
dlls/ddraw/ddraw.c
View file @
00a5f385
...
...
@@ -2558,7 +2558,7 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
parent
=
wined3d_surface_get_parent
(
wined3d_surface
);
hr
=
IWineD3DDevice_CreateSurfac
e
(
This
->
wineD3DDevice
,
wined3d_desc
.
width
,
wined3d_desc
.
height
,
hr
=
wined3d_surface_creat
e
(
This
->
wineD3DDevice
,
wined3d_desc
.
width
,
wined3d_desc
.
height
,
wined3d_desc
.
format
,
TRUE
,
FALSE
,
surfImpl
->
mipmap_level
,
wined3d_desc
.
usage
,
wined3d_desc
.
pool
,
wined3d_desc
.
multisample_type
,
wined3d_desc
.
multisample_quality
,
This
->
ImplType
,
parent
,
&
ddraw_surface_wined3d_parent_ops
,
&
surfImpl
->
wined3d_surface
);
...
...
@@ -5612,7 +5612,7 @@ struct wined3d_vertex_declaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD
}
TRACE
(
"not found. Creating and inserting at position %d.
\n
"
,
low
);
hr
=
IWineD3DDevice_CreateVertexDeclarationFromFVF
(
This
->
wineD3DDevice
,
hr
=
wined3d_vertex_declaration_create_from_fvf
(
This
->
wineD3DDevice
,
fvf
,
This
,
&
ddraw_null_wined3d_parent_ops
,
&
pDecl
);
if
(
hr
!=
S_OK
)
return
NULL
;
...
...
@@ -5870,7 +5870,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
TRACE
(
"iface %p, present_parameters %p, swapchain %p
\n
"
,
iface
,
present_parameters
,
swapchain
);
hr
=
IWineD3DDevice_CreateSwapChain
(
This
->
wineD3DDevice
,
present_parameters
,
hr
=
wined3d_swapchain_create
(
This
->
wineD3DDevice
,
present_parameters
,
This
->
ImplType
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
swapchain
);
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/device.c
View file @
00a5f385
...
...
@@ -4204,7 +4204,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
TRACE
(
"Growing index buffer to %u bytes
\n
"
,
size
);
hr
=
IWineD3DDevice_CreateIndexBuffer
(
This
->
wineD3DDevice
,
size
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
hr
=
wined3d_buffer_create_ib
(
This
->
wineD3DDevice
,
size
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
WINED3DPOOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
);
if
(
FAILED
(
hr
))
{
...
...
@@ -5819,7 +5819,7 @@ IDirect3DDeviceImpl_7_CreateStateBlock(IDirect3DDevice7 *iface,
EnterCriticalSection
(
&
ddraw_cs
);
/* The D3DSTATEBLOCKTYPE enum is fine here. */
hr
=
IWineD3DDevice_CreateStateBlock
(
This
->
wineD3DDevice
,
Type
,
&
wined3d_sb
);
hr
=
wined3d_stateblock_create
(
This
->
wineD3DDevice
,
Type
,
&
wined3d_sb
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create stateblock, hr %#x.
\n
"
,
hr
);
...
...
@@ -6811,7 +6811,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
device
->
legacyTextureBlending
=
FALSE
;
/* Create an index buffer, it's needed for indexed drawing */
hr
=
IWineD3DDevice_CreateIndexBuffer
(
ddraw
->
wineD3DDevice
,
0x40000
/* Length. Don't know how long it should be */
,
hr
=
wined3d_buffer_create_ib
(
ddraw
->
wineD3DDevice
,
0x40000
/* Length. Don't know how long it should be */
,
WINED3DUSAGE_DYNAMIC
/* Usage */
,
WINED3DPOOL_DEFAULT
,
NULL
,
&
ddraw_null_wined3d_parent_ops
,
&
device
->
indexbuffer
);
if
(
FAILED
(
hr
))
...
...
dlls/ddraw/palette.c
View file @
00a5f385
...
...
@@ -266,7 +266,7 @@ HRESULT ddraw_palette_init(IDirectDrawPaletteImpl *palette,
palette
->
lpVtbl
=
&
ddraw_palette_vtbl
;
palette
->
ref
=
1
;
hr
=
IWineD3DDevice_CreatePalet
te
(
ddraw
->
wineD3DDevice
,
flags
,
hr
=
wined3d_palette_crea
te
(
ddraw
->
wineD3DDevice
,
flags
,
entries
,
palette
,
&
palette
->
wineD3DPalette
);
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/surface.c
View file @
00a5f385
...
...
@@ -3483,10 +3483,10 @@ HRESULT ddraw_surface_create_texture(IDirectDrawSurfaceImpl *surface)
format
=
PixelFormat_DD2WineD3D
(
&
surface
->
surface_desc
.
u4
.
ddpfPixelFormat
);
if
(
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP
)
return
IWineD3DDevice_CreateCubeTextur
e
(
surface
->
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
return
wined3d_texture_create_cub
e
(
surface
->
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
levels
,
0
,
format
,
pool
,
surface
,
&
ddraw_texture_wined3d_parent_ops
,
&
surface
->
wined3d_texture
);
else
return
IWineD3DDevice_CreateTexture
(
surface
->
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
desc
->
dwHeight
,
return
wined3d_texture_create_2d
(
surface
->
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
desc
->
dwHeight
,
levels
,
0
,
format
,
pool
,
surface
,
&
ddraw_texture_wined3d_parent_ops
,
&
surface
->
wined3d_texture
);
}
...
...
@@ -3572,7 +3572,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
surface
->
first_attached
=
surface
;
surface
->
ImplType
=
surface_type
;
hr
=
IWineD3DDevice_CreateSurfac
e
(
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
desc
->
dwHeight
,
format
,
hr
=
wined3d_surface_creat
e
(
ddraw
->
wineD3DDevice
,
desc
->
dwWidth
,
desc
->
dwHeight
,
format
,
TRUE
/* Lockable */
,
FALSE
/* Discard */
,
mip_level
,
usage
,
pool
,
WINED3DMULTISAMPLE_NONE
,
0
/* MultiSampleQuality */
,
surface_type
,
surface
,
&
ddraw_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
...
...
dlls/ddraw/vertexbuffer.c
View file @
00a5f385
...
...
@@ -572,7 +572,7 @@ HRESULT d3d_vertex_buffer_init(IDirect3DVertexBufferImpl *buffer,
EnterCriticalSection
(
&
ddraw_cs
);
hr
=
IWineD3DDevice_CreateVertexBuffer
(
ddraw
->
wineD3DDevice
,
hr
=
wined3d_buffer_create_vb
(
ddraw
->
wineD3DDevice
,
get_flexible_vertex_size
(
desc
->
dwFVF
)
*
desc
->
dwNumVertices
,
usage
,
desc
->
dwCaps
&
D3DVBCAPS_SYSTEMMEMORY
?
WINED3DPOOL_SYSTEMMEM
:
WINED3DPOOL_DEFAULT
,
buffer
,
&
ddraw_null_wined3d_parent_ops
,
&
buffer
->
wineD3DVertexBuffer
);
...
...
dlls/dxgi/swapchain.c
View file @
00a5f385
...
...
@@ -274,7 +274,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
swapchain
->
vtbl
=
&
dxgi_swapchain_vtbl
;
swapchain
->
refcount
=
1
;
hr
=
IWineD3DDevice_CreateSwapChain
(
device
->
wined3d_device
,
present_parameters
,
hr
=
wined3d_swapchain_create
(
device
->
wined3d_device
,
present_parameters
,
SURFACE_OPENGL
,
swapchain
,
&
dxgi_swapchain_wined3d_parent_ops
,
&
swapchain
->
wined3d_swapchain
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/buffer.c
View file @
00a5f385
...
...
@@ -1194,7 +1194,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
buffer_unload
,
};
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
const
char
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1279,3 +1279,114 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_buffer_create
(
IWineD3DDevice
*
iface
,
struct
wined3d_buffer_desc
*
desc
,
const
void
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_buffer
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, desc %p, data %p, parent %p, buffer %p
\n
"
,
device
,
desc
,
data
,
parent
,
buffer
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate memory
\n
"
);
return
E_OUTOFMEMORY
;
}
FIXME
(
"Ignoring access flags (pool)
\n
"
);
hr
=
buffer_init
(
object
,
device
,
desc
->
byte_width
,
desc
->
usage
,
WINED3DFMT_UNKNOWN
,
WINED3DPOOL_MANAGED
,
GL_ARRAY_BUFFER_ARB
,
data
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize buffer, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
object
->
desc
=
*
desc
;
TRACE
(
"Created buffer %p.
\n
"
,
object
);
*
buffer
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_buffer_create_vb
(
IWineD3DDevice
*
iface
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_buffer
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, size %u, usage %#x, pool %#x, parent %p, parent_ops %p, buffer %p.
\n
"
,
device
,
size
,
usage
,
pool
,
parent
,
parent_ops
,
buffer
);
if
(
pool
==
WINED3DPOOL_SCRATCH
)
{
/* The d3d9 tests shows that this is not allowed. It doesn't make much
* sense anyway, SCRATCH buffers wouldn't be usable anywhere. */
WARN
(
"Vertex buffer in WINED3DPOOL_SCRATCH requested, returning WINED3DERR_INVALIDCALL.
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_INVALIDCALL
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
buffer_init
(
object
,
device
,
size
,
usage
,
WINED3DFMT_VERTEXDATA
,
pool
,
GL_ARRAY_BUFFER_ARB
,
NULL
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize buffer, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created buffer %p.
\n
"
,
object
);
*
buffer
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_buffer_create_ib
(
IWineD3DDevice
*
iface
,
UINT
size
,
DWORD
usage
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_buffer
**
buffer
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_buffer
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, size %u, usage %#x, pool %#x, parent %p, parent_ops %p, buffer %p.
\n
"
,
device
,
size
,
usage
,
pool
,
parent
,
parent_ops
,
buffer
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
buffer_init
(
object
,
device
,
size
,
usage
|
WINED3DUSAGE_STATICDECL
,
WINED3DFMT_UNKNOWN
,
pool
,
GL_ELEMENT_ARRAY_BUFFER_ARB
,
NULL
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize buffer, hr %#x
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created buffer %p.
\n
"
,
object
);
*
buffer
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/device.c
View file @
00a5f385
This diff is collapsed.
Click to expand it.
dlls/wined3d/palette.c
View file @
00a5f385
...
...
@@ -158,7 +158,7 @@ void * CDECL wined3d_palette_get_parent(const struct wined3d_palette *palette)
return
palette
->
parent
;
}
HRESULT
wined3d_palette_init
(
struct
wined3d_palette
*
palette
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
wined3d_palette_init
(
struct
wined3d_palette
*
palette
,
IWineD3DDeviceImpl
*
device
,
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
void
*
parent
)
{
HRESULT
hr
;
...
...
@@ -186,3 +186,34 @@ HRESULT wined3d_palette_init(struct wined3d_palette *palette, IWineD3DDeviceImpl
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_palette_create
(
IWineD3DDevice
*
iface
,
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
void
*
parent
,
struct
wined3d_palette
**
palette
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_palette
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, flags %#x, entries %p, palette %p, parent %p.
\n
"
,
device
,
flags
,
entries
,
palette
,
parent
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate palette memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
wined3d_palette_init
(
object
,
device
,
flags
,
entries
,
parent
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize palette, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created palette %p.
\n
"
,
object
);
*
palette
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/query.c
View file @
00a5f385
...
...
@@ -547,7 +547,7 @@ static const struct wined3d_query_ops occlusion_query_ops =
wined3d_occlusion_query_ops_issue
,
};
HRESULT
query_init
(
struct
wined3d_query
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
)
static
HRESULT
query_init
(
struct
wined3d_query
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -615,3 +615,33 @@ HRESULT query_init(struct wined3d_query *query, IWineD3DDeviceImpl *device, WINE
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_query_create
(
IWineD3DDevice
*
iface
,
WINED3DQUERYTYPE
type
,
struct
wined3d_query
**
query
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_query
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, type %#x, query %p.
\n
"
,
device
,
type
,
query
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate query memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
query_init
(
object
,
device
,
type
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize query, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created query %p.
\n
"
,
object
);
*
query
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/shader.c
View file @
00a5f385
...
...
@@ -1795,7 +1795,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader)
}
}
HRESULT
vertexshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
vertexshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1844,7 +1844,7 @@ HRESULT vertexshader_init(struct wined3d_shader *shader, IWineD3DDeviceImpl *dev
return
WINED3D_OK
;
}
HRESULT
geometryshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
geometryshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -2050,7 +2050,7 @@ static void pixelshader_set_limits(struct wined3d_shader *shader)
}
}
HRESULT
pixelshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
pixelshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -2159,3 +2159,105 @@ void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struc
}
}
}
HRESULT
CDECL
wined3d_shader_create_gs
(
IWineD3DDevice
*
iface
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_shader
**
shader
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_shader
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.
\n
"
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
shader
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
geometryshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize geometry shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created geometry shader %p.
\n
"
,
object
);
*
shader
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_shader_create_ps
(
IWineD3DDevice
*
iface
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_shader
**
shader
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_shader
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.
\n
"
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
shader
);
if
(
device
->
ps_selected_mode
==
SHADER_NONE
)
return
WINED3DERR_INVALIDCALL
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
pixelshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize pixel shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created pixel shader %p.
\n
"
,
object
);
*
shader
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_shader_create_vs
(
IWineD3DDevice
*
iface
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_shader
**
shader
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_shader
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, byte_code %p, output_signature %p, parent %p, parent_ops %p, shader %p.
\n
"
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
shader
);
if
(
device
->
vs_selected_mode
==
SHADER_NONE
)
return
WINED3DERR_INVALIDCALL
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
vertexshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize vertex shader, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
*
shader
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/stateblock.c
View file @
00a5f385
...
...
@@ -1327,7 +1327,8 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
TRACE
(
"Done.
\n
"
);
}
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
IWineD3DDeviceImpl
*
device
,
WINED3DSTATEBLOCKTYPE
type
)
static
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
IWineD3DDeviceImpl
*
device
,
WINED3DSTATEBLOCKTYPE
type
)
{
unsigned
int
i
;
HRESULT
hr
;
...
...
@@ -1378,3 +1379,34 @@ HRESULT stateblock_init(struct wined3d_stateblock *stateblock, IWineD3DDeviceImp
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_stateblock_create
(
IWineD3DDevice
*
iface
,
WINED3DSTATEBLOCKTYPE
type
,
struct
wined3d_stateblock
**
stateblock
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_stateblock
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, type %#x, stateblock %p.
\n
"
,
device
,
type
,
stateblock
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate stateblock memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
stateblock_init
(
object
,
device
,
type
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize stateblock, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created stateblock %p.
\n
"
,
object
);
*
stateblock
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/surface.c
View file @
00a5f385
...
...
@@ -3304,7 +3304,7 @@ static struct wined3d_surface *surface_convert_format(struct wined3d_surface *so
return
NULL
;
}
IWineD3DDevice_CreateSurfac
e
((
IWineD3DDevice
*
)
source
->
resource
.
device
,
source
->
resource
.
width
,
wined3d_surface_creat
e
((
IWineD3DDevice
*
)
source
->
resource
.
device
,
source
->
resource
.
width
,
source
->
resource
.
height
,
to_fmt
,
TRUE
/* lockable */
,
TRUE
/* discard */
,
0
/* level */
,
0
/* usage */
,
WINED3DPOOL_SCRATCH
,
WINED3DMULTISAMPLE_NONE
/* TODO: Multisampled conversion */
,
0
/* MultiSampleQuality */
,
source
->
surface_type
,
NULL
/* parent */
,
&
wined3d_null_parent_ops
,
&
ret
);
...
...
@@ -7325,7 +7325,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_depth_fill
,
};
HRESULT
surface_init
(
struct
wined3d_surface
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
static
HRESULT
surface_init
(
struct
wined3d_surface
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
UINT
width
,
UINT
height
,
UINT
level
,
BOOL
lockable
,
BOOL
discard
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
...
...
@@ -7451,3 +7451,46 @@ HRESULT surface_init(struct wined3d_surface *surface, WINED3DSURFTYPE surface_ty
return
hr
;
}
HRESULT
CDECL
wined3d_surface_create
(
IWineD3DDevice
*
iface
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
BOOL
lockable
,
BOOL
discard
,
UINT
level
,
DWORD
usage
,
WINED3DPOOL
pool
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
DWORD
multisample_quality
,
WINED3DSURFTYPE
surface_type
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_surface
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, width %u, height %u, format %s, lockable %#x, discard %#x, level %u
\n
"
,
device
,
width
,
height
,
debug_d3dformat
(
format_id
),
lockable
,
discard
,
level
);
TRACE
(
"surface %p, usage %s (%#x), pool %s, multisample_type %#x, multisample_quality %u
\n
"
,
surface
,
debug_d3dusage
(
usage
),
usage
,
debug_d3dpool
(
pool
),
multisample_type
,
multisample_quality
);
TRACE
(
"surface_type %#x, parent %p, parent_ops %p.
\n
"
,
surface_type
,
parent
,
parent_ops
);
if
(
surface_type
==
SURFACE_OPENGL
&&
!
device
->
adapter
)
{
ERR
(
"OpenGL surfaces are not available without OpenGL.
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate surface memory.
\n
"
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
surface_init
(
object
,
surface_type
,
device
->
surface_alignment
,
width
,
height
,
level
,
lockable
,
discard
,
multisample_type
,
multisample_quality
,
device
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize surface, returning %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created surface %p.
\n
"
,
object
);
*
surface
=
object
;
return
hr
;
}
dlls/wined3d/swapchain.c
View file @
00a5f385
...
...
@@ -801,7 +801,7 @@ static const struct wined3d_swapchain_ops swapchain_gdi_ops =
};
/* Do not call while under the GL lock. */
HRESULT
swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
static
HRESULT
swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1092,6 +1092,40 @@ err:
}
/* Do not call while under the GL lock. */
HRESULT
CDECL
wined3d_swapchain_create
(
IWineD3DDevice
*
iface
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
WINED3DSURFTYPE
surface_type
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_swapchain
**
swapchain
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_swapchain
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, present_parameters %p, swapchain %p, parent %p, surface_type %#x.
\n
"
,
device
,
present_parameters
,
swapchain
,
parent
,
surface_type
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate swapchain memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
swapchain_init
(
object
,
surface_type
,
device
,
present_parameters
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize swapchain, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created swapchain %p.
\n
"
,
object
);
*
swapchain
=
object
;
return
WINED3D_OK
;
}
/* Do not call while under the GL lock. */
static
struct
wined3d_context
*
swapchain_create_context
(
struct
wined3d_swapchain
*
swapchain
)
{
struct
wined3d_context
**
newArray
;
...
...
dlls/wined3d/texture.c
View file @
00a5f385
...
...
@@ -796,7 +796,7 @@ static const struct wined3d_resource_ops texture2d_resource_ops =
texture2d_unload
,
};
HRESULT
cubetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
edge_length
,
UINT
levels
,
static
HRESULT
cubetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
edge_length
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -915,7 +915,7 @@ HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_length, UINT
return
WINED3D_OK
;
}
HRESULT
texture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
static
HRESULT
texture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1186,7 +1186,7 @@ static const struct wined3d_resource_ops texture3d_resource_ops =
texture3d_unload
,
};
HRESULT
volumetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
static
HRESULT
volumetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -1280,3 +1280,114 @@ HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, UINT hei
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_texture_create_2d
(
IWineD3DDevice
*
iface
,
UINT
width
,
UINT
height
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_texture
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, width %u, height %u, level_count %u, usage %#x
\n
"
,
device
,
width
,
height
,
level_count
,
usage
);
TRACE
(
"format %s, pool %#x, parent %p, parent_ops %p, texture %p.
\n
"
,
debug_d3dformat
(
format_id
),
pool
,
parent
,
parent_ops
,
texture
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory.
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
texture_init
(
object
,
width
,
height
,
level_count
,
device
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize texture, returning %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
texture
=
NULL
;
return
hr
;
}
TRACE
(
"Created texture %p.
\n
"
,
object
);
*
texture
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_texture_create_3d
(
IWineD3DDevice
*
iface
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_texture
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, width %u, height %u, depth %u, level_count %u, usage %#x
\n
"
,
device
,
width
,
height
,
depth
,
level_count
,
usage
);
TRACE
(
"format %s, pool %#x, parent %p, parent_ops %p, texture %p.
\n
"
,
debug_d3dformat
(
format_id
),
pool
,
parent
,
parent_ops
,
texture
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volumetexture_init
(
object
,
width
,
height
,
depth
,
level_count
,
device
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize volumetexture, returning %#x
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
texture
=
NULL
;
return
hr
;
}
TRACE
(
"Created texture %p.
\n
"
,
object
);
*
texture
=
object
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_texture_create_cube
(
IWineD3DDevice
*
iface
,
UINT
edge_length
,
UINT
level_count
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_texture
**
texture
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_texture
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, edge_length %u, level_count %u, usage %#x
\n
"
,
device
,
edge_length
,
level_count
,
usage
);
TRACE
(
"format %s, pool %#x, parent %p, parent_ops %p, texture %p.
\n
"
,
debug_d3dformat
(
format_id
),
pool
,
parent
,
parent_ops
,
texture
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
cubetexture_init
(
object
,
edge_length
,
level_count
,
device
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize cubetexture, returning %#x
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
*
texture
=
NULL
;
return
hr
;
}
TRACE
(
"Created texture %p.
\n
"
,
object
);
*
texture
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/vertexdeclaration.c
View file @
00a5f385
...
...
@@ -157,7 +157,7 @@ static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
}
}
HRESULT
vertexdeclaration_init
(
struct
wined3d_vertex_declaration
*
declaration
,
IWineD3DDeviceImpl
*
device
,
static
HRESULT
vertexdeclaration_init
(
struct
wined3d_vertex_declaration
*
declaration
,
IWineD3DDeviceImpl
*
device
,
const
WINED3DVERTEXELEMENT
*
elements
,
UINT
element_count
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -236,3 +236,191 @@ HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declaration, I
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_vertex_declaration_create
(
IWineD3DDevice
*
iface
,
const
WINED3DVERTEXELEMENT
*
elements
,
UINT
element_count
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_vertex_declaration
**
declaration
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_vertex_declaration
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, elements %p, element_count %u, parent %p, parent_ops %p, declaration %p.
\n
"
,
device
,
elements
,
element_count
,
parent
,
parent_ops
,
declaration
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate vertex declaration memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
vertexdeclaration_init
(
object
,
device
,
elements
,
element_count
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize vertex declaration, hr %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created vertex declaration %p.
\n
"
,
object
);
*
declaration
=
object
;
return
WINED3D_OK
;
}
struct
wined3d_fvf_convert_state
{
const
struct
wined3d_gl_info
*
gl_info
;
WINED3DVERTEXELEMENT
*
elements
;
UINT
offset
;
UINT
idx
;
};
static
void
append_decl_element
(
struct
wined3d_fvf_convert_state
*
state
,
enum
wined3d_format_id
format_id
,
WINED3DDECLUSAGE
usage
,
UINT
usage_idx
)
{
WINED3DVERTEXELEMENT
*
elements
=
state
->
elements
;
const
struct
wined3d_format
*
format
;
UINT
offset
=
state
->
offset
;
UINT
idx
=
state
->
idx
;
elements
[
idx
].
format
=
format_id
;
elements
[
idx
].
input_slot
=
0
;
elements
[
idx
].
offset
=
offset
;
elements
[
idx
].
output_slot
=
0
;
elements
[
idx
].
method
=
WINED3DDECLMETHOD_DEFAULT
;
elements
[
idx
].
usage
=
usage
;
elements
[
idx
].
usage_idx
=
usage_idx
;
format
=
wined3d_get_format
(
state
->
gl_info
,
format_id
);
state
->
offset
+=
format
->
component_count
*
format
->
component_size
;
++
state
->
idx
;
}
static
unsigned
int
convert_fvf_to_declaration
(
const
struct
wined3d_gl_info
*
gl_info
,
DWORD
fvf
,
WINED3DVERTEXELEMENT
**
elements
)
{
BOOL
has_pos
=
!!
(
fvf
&
WINED3DFVF_POSITION_MASK
);
BOOL
has_blend
=
(
fvf
&
WINED3DFVF_XYZB5
)
>
WINED3DFVF_XYZRHW
;
BOOL
has_blend_idx
=
has_blend
&&
(((
fvf
&
WINED3DFVF_XYZB5
)
==
WINED3DFVF_XYZB5
)
||
(
fvf
&
WINED3DFVF_LASTBETA_D3DCOLOR
)
||
(
fvf
&
WINED3DFVF_LASTBETA_UBYTE4
));
BOOL
has_normal
=
!!
(
fvf
&
WINED3DFVF_NORMAL
);
BOOL
has_psize
=
!!
(
fvf
&
WINED3DFVF_PSIZE
);
BOOL
has_diffuse
=
!!
(
fvf
&
WINED3DFVF_DIFFUSE
);
BOOL
has_specular
=
!!
(
fvf
&
WINED3DFVF_SPECULAR
);
DWORD
num_textures
=
(
fvf
&
WINED3DFVF_TEXCOUNT_MASK
)
>>
WINED3DFVF_TEXCOUNT_SHIFT
;
DWORD
texcoords
=
(
fvf
&
0xFFFF0000
)
>>
16
;
struct
wined3d_fvf_convert_state
state
;
unsigned
int
size
;
unsigned
int
idx
;
DWORD
num_blends
=
1
+
(((
fvf
&
WINED3DFVF_XYZB5
)
-
WINED3DFVF_XYZB1
)
>>
1
);
if
(
has_blend_idx
)
num_blends
--
;
/* Compute declaration size */
size
=
has_pos
+
(
has_blend
&&
num_blends
>
0
)
+
has_blend_idx
+
has_normal
+
has_psize
+
has_diffuse
+
has_specular
+
num_textures
;
state
.
gl_info
=
gl_info
;
state
.
elements
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
state
.
elements
));
if
(
!
state
.
elements
)
return
~
0U
;
state
.
offset
=
0
;
state
.
idx
=
0
;
if
(
has_pos
)
{
if
(
!
has_blend
&&
(
fvf
&
WINED3DFVF_XYZRHW
))
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32A32_FLOAT
,
WINED3DDECLUSAGE_POSITIONT
,
0
);
else
if
((
fvf
&
WINED3DFVF_XYZW
)
==
WINED3DFVF_XYZW
)
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32A32_FLOAT
,
WINED3DDECLUSAGE_POSITION
,
0
);
else
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32_FLOAT
,
WINED3DDECLUSAGE_POSITION
,
0
);
}
if
(
has_blend
&&
(
num_blends
>
0
))
{
if
((
fvf
&
WINED3DFVF_XYZB5
)
==
WINED3DFVF_XYZB2
&&
(
fvf
&
WINED3DFVF_LASTBETA_D3DCOLOR
))
append_decl_element
(
&
state
,
WINED3DFMT_B8G8R8A8_UNORM
,
WINED3DDECLUSAGE_BLENDWEIGHT
,
0
);
else
{
switch
(
num_blends
)
{
case
1
:
append_decl_element
(
&
state
,
WINED3DFMT_R32_FLOAT
,
WINED3DDECLUSAGE_BLENDWEIGHT
,
0
);
break
;
case
2
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32_FLOAT
,
WINED3DDECLUSAGE_BLENDWEIGHT
,
0
);
break
;
case
3
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32_FLOAT
,
WINED3DDECLUSAGE_BLENDWEIGHT
,
0
);
break
;
case
4
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32A32_FLOAT
,
WINED3DDECLUSAGE_BLENDWEIGHT
,
0
);
break
;
default:
ERR
(
"Unexpected amount of blend values: %u
\n
"
,
num_blends
);
}
}
}
if
(
has_blend_idx
)
{
if
((
fvf
&
WINED3DFVF_LASTBETA_UBYTE4
)
||
((
fvf
&
WINED3DFVF_XYZB5
)
==
WINED3DFVF_XYZB2
&&
(
fvf
&
WINED3DFVF_LASTBETA_D3DCOLOR
)))
append_decl_element
(
&
state
,
WINED3DFMT_R8G8B8A8_UINT
,
WINED3DDECLUSAGE_BLENDINDICES
,
0
);
else
if
(
fvf
&
WINED3DFVF_LASTBETA_D3DCOLOR
)
append_decl_element
(
&
state
,
WINED3DFMT_B8G8R8A8_UNORM
,
WINED3DDECLUSAGE_BLENDINDICES
,
0
);
else
append_decl_element
(
&
state
,
WINED3DFMT_R32_FLOAT
,
WINED3DDECLUSAGE_BLENDINDICES
,
0
);
}
if
(
has_normal
)
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32_FLOAT
,
WINED3DDECLUSAGE_NORMAL
,
0
);
if
(
has_psize
)
append_decl_element
(
&
state
,
WINED3DFMT_R32_FLOAT
,
WINED3DDECLUSAGE_PSIZE
,
0
);
if
(
has_diffuse
)
append_decl_element
(
&
state
,
WINED3DFMT_B8G8R8A8_UNORM
,
WINED3DDECLUSAGE_COLOR
,
0
);
if
(
has_specular
)
append_decl_element
(
&
state
,
WINED3DFMT_B8G8R8A8_UNORM
,
WINED3DDECLUSAGE_COLOR
,
1
);
for
(
idx
=
0
;
idx
<
num_textures
;
++
idx
)
{
switch
((
texcoords
>>
(
idx
*
2
))
&
0x03
)
{
case
WINED3DFVF_TEXTUREFORMAT1
:
append_decl_element
(
&
state
,
WINED3DFMT_R32_FLOAT
,
WINED3DDECLUSAGE_TEXCOORD
,
idx
);
break
;
case
WINED3DFVF_TEXTUREFORMAT2
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32_FLOAT
,
WINED3DDECLUSAGE_TEXCOORD
,
idx
);
break
;
case
WINED3DFVF_TEXTUREFORMAT3
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32_FLOAT
,
WINED3DDECLUSAGE_TEXCOORD
,
idx
);
break
;
case
WINED3DFVF_TEXTUREFORMAT4
:
append_decl_element
(
&
state
,
WINED3DFMT_R32G32B32A32_FLOAT
,
WINED3DDECLUSAGE_TEXCOORD
,
idx
);
break
;
}
}
*
elements
=
state
.
elements
;
return
size
;
}
HRESULT
CDECL
wined3d_vertex_declaration_create_from_fvf
(
IWineD3DDevice
*
iface
,
DWORD
fvf
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_vertex_declaration
**
declaration
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
WINED3DVERTEXELEMENT
*
elements
;
unsigned
int
size
;
DWORD
hr
;
TRACE
(
"device %p, fvf %#x, parent %p, parent_ops %p, declaration %p.
\n
"
,
device
,
fvf
,
parent
,
parent_ops
,
declaration
);
size
=
convert_fvf_to_declaration
(
&
device
->
adapter
->
gl_info
,
fvf
,
&
elements
);
if
(
size
==
~
0U
)
return
E_OUTOFMEMORY
;
hr
=
wined3d_vertex_declaration_create
(
iface
,
elements
,
size
,
parent
,
parent_ops
,
declaration
);
HeapFree
(
GetProcessHeap
(),
0
,
elements
);
return
hr
;
}
dlls/wined3d/view.c
View file @
00a5f385
...
...
@@ -59,10 +59,33 @@ struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const str
return
view
->
resource
;
}
void
wined3d_rendertarget_view_init
(
struct
wined3d_rendertarget_view
*
view
,
static
void
wined3d_rendertarget_view_init
(
struct
wined3d_rendertarget_view
*
view
,
struct
wined3d_resource
*
resource
,
void
*
parent
)
{
view
->
refcount
=
1
;
view
->
resource
=
resource
;
view
->
parent
=
parent
;
}
HRESULT
CDECL
wined3d_rendertarget_view_create
(
struct
wined3d_resource
*
resource
,
void
*
parent
,
struct
wined3d_rendertarget_view
**
rendertarget_view
)
{
struct
wined3d_rendertarget_view
*
object
;
TRACE
(
"resource %p, parent %p, rendertarget_view %p.
\n
"
,
resource
,
parent
,
rendertarget_view
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate memory
\n
"
);
return
E_OUTOFMEMORY
;
}
wined3d_rendertarget_view_init
(
object
,
resource
,
parent
);
TRACE
(
"Created render target view %p.
\n
"
,
object
);
*
rendertarget_view
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/volume.c
View file @
00a5f385
...
...
@@ -296,7 +296,7 @@ static const struct wined3d_resource_ops volume_resource_ops =
volume_unload
,
};
HRESULT
volume_init
(
struct
wined3d_volume
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
static
HRESULT
volume_init
(
struct
wined3d_volume
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
...
...
@@ -329,3 +329,37 @@ HRESULT volume_init(struct wined3d_volume *volume, IWineD3DDeviceImpl *device, U
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_volume_create
(
IWineD3DDevice
*
iface
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
struct
wined3d_volume
*
object
;
HRESULT
hr
;
TRACE
(
"device %p, width %u, height %u, depth %u, usage %#x, format %s, pool %s
\n
"
,
device
,
width
,
height
,
depth
,
usage
,
debug_d3dformat
(
format_id
),
debug_d3dpool
(
pool
));
TRACE
(
"parent %p, parent_ops %p, volume %p.
\n
"
,
parent
,
parent_ops
,
volume
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
volume
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize volume, returning %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
TRACE
(
"Created volume %p.
\n
"
,
object
);
*
volume
=
object
;
return
WINED3D_OK
;
}
dlls/wined3d/wined3d.spec
View file @
00a5f385
...
...
@@ -19,6 +19,9 @@
@ cdecl wined3d_incref(ptr)
@ cdecl wined3d_register_software_device(ptr ptr)
@ cdecl wined3d_buffer_create(ptr ptr ptr ptr ptr ptr)
@ cdecl wined3d_buffer_create_ib(ptr long long long ptr ptr ptr)
@ cdecl wined3d_buffer_create_vb(ptr long long long ptr ptr ptr)
@ cdecl wined3d_buffer_decref(ptr)
@ cdecl wined3d_buffer_free_private_data(ptr ptr)
@ cdecl wined3d_buffer_get_parent(ptr)
...
...
@@ -43,6 +46,7 @@
@ cdecl wined3d_device_create(ptr long long ptr long ptr ptr)
@ cdecl wined3d_palette_create(ptr long ptr ptr ptr)
@ cdecl wined3d_palette_decref(ptr)
@ cdecl wined3d_palette_get_entries(ptr long long long ptr)
@ cdecl wined3d_palette_get_flags(ptr)
...
...
@@ -50,6 +54,7 @@
@ cdecl wined3d_palette_incref(ptr)
@ cdecl wined3d_palette_set_entries(ptr long long long ptr)
@ cdecl wined3d_query_create(ptr long ptr)
@ cdecl wined3d_query_decref(ptr)
@ cdecl wined3d_query_get_data(ptr ptr long long)
@ cdecl wined3d_query_get_data_size(ptr)
...
...
@@ -60,11 +65,15 @@
@ cdecl wined3d_resource_get_desc(ptr ptr)
@ cdecl wined3d_resource_get_parent(ptr)
@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr)
@ cdecl wined3d_rendertarget_view_decref(ptr)
@ cdecl wined3d_rendertarget_view_get_parent(ptr)
@ cdecl wined3d_rendertarget_view_get_resource(ptr)
@ cdecl wined3d_rendertarget_view_incref(ptr)
@ cdecl wined3d_shader_create_gs(ptr ptr ptr ptr ptr ptr)
@ cdecl wined3d_shader_create_ps(ptr ptr ptr ptr ptr ptr)
@ cdecl wined3d_shader_create_vs(ptr ptr ptr ptr ptr ptr)
@ cdecl wined3d_shader_decref(ptr)
@ cdecl wined3d_shader_get_byte_code(ptr ptr ptr)
@ cdecl wined3d_shader_get_parent(ptr)
...
...
@@ -73,11 +82,13 @@
@ cdecl wined3d_stateblock_apply(ptr)
@ cdecl wined3d_stateblock_capture(ptr)
@ cdecl wined3d_stateblock_create(ptr long ptr)
@ cdecl wined3d_stateblock_decref(ptr)
@ cdecl wined3d_stateblock_incref(ptr)
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
@ cdecl wined3d_surface_bltfast(ptr long long ptr ptr long)
@ cdecl wined3d_surface_create(ptr long long long long long long long long long long long ptr ptr ptr)
@ cdecl wined3d_surface_decref(ptr)
@ cdecl wined3d_surface_flip(ptr ptr long)
@ cdecl wined3d_surface_free_private_data(ptr ptr)
...
...
@@ -110,6 +121,7 @@
@ cdecl wined3d_surface_update_overlay(ptr ptr ptr ptr long ptr)
@ cdecl wined3d_surface_update_overlay_z_order(ptr long ptr)
@ cdecl wined3d_swapchain_create(ptr ptr long ptr ptr ptr)
@ cdecl wined3d_swapchain_decref(ptr)
@ cdecl wined3d_swapchain_get_back_buffer(ptr long long ptr)
@ cdecl wined3d_swapchain_get_device(ptr)
...
...
@@ -125,6 +137,9 @@
@ cdecl wined3d_swapchain_set_window(ptr ptr)
@ cdecl wined3d_texture_add_dirty_region(ptr long ptr)
@ cdecl wined3d_texture_create_2d(ptr long long long long long long ptr ptr ptr)
@ cdecl wined3d_texture_create_3d(ptr long long long long long long long ptr ptr ptr)
@ cdecl wined3d_texture_create_cube(ptr long long long long long ptr ptr ptr)
@ cdecl wined3d_texture_decref(ptr)
@ cdecl wined3d_texture_free_private_data(ptr ptr)
@ cdecl wined3d_texture_generate_mipmaps(ptr)
...
...
@@ -143,10 +158,13 @@
@ cdecl wined3d_texture_set_priority(ptr long)
@ cdecl wined3d_texture_set_private_data(ptr ptr ptr long long)
@ cdecl wined3d_vertex_declaration_create(ptr ptr long ptr ptr ptr)
@ cdecl wined3d_vertex_declaration_create_from_fvf(ptr long ptr ptr ptr)
@ cdecl wined3d_vertex_declaration_decref(ptr)
@ cdecl wined3d_vertex_declaration_get_parent(ptr)
@ cdecl wined3d_vertex_declaration_incref(ptr)
@ cdecl wined3d_volume_create(ptr long long long long long long ptr ptr ptr)
@ cdecl wined3d_volume_decref(ptr)
@ cdecl wined3d_volume_free_private_data(ptr ptr)
@ cdecl wined3d_volume_from_resource(ptr)
...
...
dlls/wined3d/wined3d_private.h
View file @
00a5f385
...
...
@@ -1935,18 +1935,6 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
void
wined3d_texture_set_dirty
(
struct
wined3d_texture
*
texture
,
BOOL
dirty
)
DECLSPEC_HIDDEN
;
HRESULT
cubetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
edge_length
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
HRESULT
texture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
HRESULT
volumetexture_init
(
struct
wined3d_texture
*
texture
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
levels
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
struct
wined3d_volume
{
struct
wined3d_resource
resource
;
...
...
@@ -1964,9 +1952,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
}
void
volume_add_dirty_box
(
struct
wined3d_volume
*
volume
,
const
WINED3DBOX
*
dirty_box
)
DECLSPEC_HIDDEN
;
HRESULT
volume_init
(
struct
wined3d_volume
*
volume
,
IWineD3DDeviceImpl
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
volume_load
(
struct
wined3d_volume
*
volume
,
UINT
level
,
BOOL
srgb_mode
)
DECLSPEC_HIDDEN
;
void
volume_set_container
(
struct
wined3d_volume
*
volume
,
struct
wined3d_texture
*
container
)
DECLSPEC_HIDDEN
;
...
...
@@ -2115,10 +2100,6 @@ void surface_add_dirty_rect(struct wined3d_surface *surface, const WINED3DBOX *d
void
surface_bind
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
HRESULT
surface_color_fill
(
struct
wined3d_surface
*
s
,
const
RECT
*
rect
,
const
WINED3DCOLORVALUE
*
color
)
DECLSPEC_HIDDEN
;
GLenum
surface_get_gl_buffer
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
HRESULT
surface_init
(
struct
wined3d_surface
*
surface
,
WINED3DSURFTYPE
surface_type
,
UINT
alignment
,
UINT
width
,
UINT
height
,
UINT
level
,
BOOL
lockable
,
BOOL
discard
,
WINED3DMULTISAMPLE_TYPE
multisample_type
,
UINT
multisample_quality
,
IWineD3DDeviceImpl
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
BOOL
surface_init_sysmem
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
void
surface_internal_preload
(
struct
wined3d_surface
*
surface
,
enum
WINED3DSRGB
srgb
)
DECLSPEC_HIDDEN
;
BOOL
surface_is_offscreen
(
struct
wined3d_surface
*
surface
)
DECLSPEC_HIDDEN
;
...
...
@@ -2239,10 +2220,6 @@ struct wined3d_vertex_declaration
BOOL
half_float_conv_needed
;
};
HRESULT
vertexdeclaration_init
(
struct
wined3d_vertex_declaration
*
declaration
,
IWineD3DDeviceImpl
*
device
,
const
WINED3DVERTEXELEMENT
*
elements
,
UINT
element_count
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
/* Internal state Block for Begin/End/Capture/Create/Apply info */
/* Note: Very long winded but gl Lists are not flexible enough */
/* to resolve everything we need, so doing it manually for now */
...
...
@@ -2361,8 +2338,6 @@ struct wined3d_stateblock
unsigned
int
num_contained_sampler_states
;
};
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
IWineD3DDeviceImpl
*
device
,
WINED3DSTATEBLOCKTYPE
type
)
DECLSPEC_HIDDEN
;
void
stateblock_init_contained_states
(
struct
wined3d_stateblock
*
stateblock
)
DECLSPEC_HIDDEN
;
void
stateblock_init_default_state
(
struct
wined3d_stateblock
*
stateblock
)
DECLSPEC_HIDDEN
;
...
...
@@ -2401,8 +2376,6 @@ struct wined3d_query
void
*
extendedData
;
};
HRESULT
query_init
(
struct
wined3d_query
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
)
DECLSPEC_HIDDEN
;
/* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other
* fixed function semantics as D3DCOLOR or FLOAT16 */
enum
wined3d_buffer_conversion_type
...
...
@@ -2461,9 +2434,6 @@ static inline struct wined3d_buffer *buffer_from_resource(struct wined3d_resourc
const
BYTE
*
buffer_get_memory
(
struct
wined3d_buffer
*
buffer
,
const
struct
wined3d_gl_info
*
gl_info
,
GLuint
*
buffer_object
)
DECLSPEC_HIDDEN
;
BYTE
*
buffer_get_sysmem
(
struct
wined3d_buffer
*
This
,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
HRESULT
buffer_init
(
struct
wined3d_buffer
*
buffer
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
WINED3DPOOL
pool
,
GLenum
bind_hint
,
const
char
*
data
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
struct
wined3d_rendertarget_view
{
...
...
@@ -2473,9 +2443,6 @@ struct wined3d_rendertarget_view
void
*
parent
;
};
void
wined3d_rendertarget_view_init
(
struct
wined3d_rendertarget_view
*
view
,
struct
wined3d_resource
*
resource
,
void
*
parent
)
DECLSPEC_HIDDEN
;
struct
wined3d_swapchain_ops
{
HRESULT
(
*
swapchain_present
)(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
...
...
@@ -2514,9 +2481,6 @@ struct wined3d_swapchain
void
x11_copy_to_screen
(
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
swapchain_get_context
(
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
HRESULT
swapchain_init
(
struct
wined3d_swapchain
*
swapchain
,
WINED3DSURFTYPE
surface_type
,
IWineD3DDeviceImpl
*
device
,
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
#define DEFAULT_REFRESH_RATE 0
...
...
@@ -2676,13 +2640,6 @@ struct wined3d_shader
}
u
;
};
HRESULT
geometryshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
HRESULT
pixelshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
pixelshader_update_samplers
(
struct
wined3d_shader_reg_maps
*
reg_maps
,
struct
wined3d_texture
*
const
*
textures
)
DECLSPEC_HIDDEN
;
void
find_ps_compile_args
(
const
struct
wined3d_state
*
state
,
...
...
@@ -2690,9 +2647,6 @@ void find_ps_compile_args(const struct wined3d_state *state,
void
find_vs_compile_args
(
const
struct
wined3d_state
*
state
,
const
struct
wined3d_shader
*
shader
,
struct
vs_compile_args
*
args
)
DECLSPEC_HIDDEN
;
HRESULT
vertexshader_init
(
struct
wined3d_shader
*
shader
,
IWineD3DDeviceImpl
*
device
,
const
DWORD
*
byte_code
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
void
shader_buffer_clear
(
struct
wined3d_shader_buffer
*
buffer
)
DECLSPEC_HIDDEN
;
BOOL
shader_buffer_init
(
struct
wined3d_shader_buffer
*
buffer
)
DECLSPEC_HIDDEN
;
...
...
@@ -2822,9 +2776,6 @@ struct wined3d_palette
DWORD
flags
;
};
HRESULT
wined3d_palette_init
(
struct
wined3d_palette
*
palette
,
IWineD3DDeviceImpl
*
device
,
DWORD
flags
,
const
PALETTEENTRY
*
entries
,
void
*
parent
)
DECLSPEC_HIDDEN
;
/* DirectDraw utility functions */
extern
enum
wined3d_format_id
pixelformat_for_depth
(
DWORD
depth
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
00a5f385
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment