Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ce912d51
Commit
ce912d51
authored
Jan 17, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the surface_type parameter to wined3d_surface_create().
parent
aa4b4e8a
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
46 deletions
+24
-46
device.c
dlls/d3d10core/device.c
+1
-2
surface.c
dlls/d3d8/surface.c
+1
-1
surface.c
dlls/d3d9/surface.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+3
-3
surface.c
dlls/ddraw/surface.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+13
-32
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
wined3d.h
include/wine/wined3d.h
+2
-3
No files found.
dlls/d3d10core/device.c
View file @
ce912d51
...
...
@@ -1862,8 +1862,7 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_
device_parent
,
container_parent
,
width
,
height
,
format
,
usage
,
pool
,
sub_resource_idx
,
surface
);
return
wined3d_surface_create
(
device
->
wined3d_device
,
width
,
height
,
format
,
usage
,
pool
,
WINED3D_MULTISAMPLE_NONE
,
0
,
WINED3D_SURFACE_TYPE_OPENGL
,
0
,
container_parent
,
&
d3d10_null_wined3d_parent_ops
,
surface
);
WINED3D_MULTISAMPLE_NONE
,
0
,
0
,
container_parent
,
&
d3d10_null_wined3d_parent_ops
,
surface
);
}
static
HRESULT
CDECL
device_parent_create_swapchain_surface
(
struct
wined3d_device_parent
*
device_parent
,
...
...
dlls/d3d8/surface.c
View file @
ce912d51
...
...
@@ -350,7 +350,7 @@ HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device, U
wined3d_mutex_lock
();
hr
=
wined3d_surface_create
(
device
->
wined3d_device
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
usage
&
WINED3DUSAGE_MASK
,
(
enum
wined3d_pool
)
pool
,
multisample_type
,
multisample_quality
,
WINED3D_SURFACE_TYPE_OPENGL
,
flags
,
surface
,
&
d3d8_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
flags
,
surface
,
&
d3d8_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/surface.c
View file @
ce912d51
...
...
@@ -431,7 +431,7 @@ HRESULT surface_init(struct d3d9_surface *surface, struct d3d9_device *device, U
wined3d_mutex_lock
();
hr
=
wined3d_surface_create
(
device
->
wined3d_device
,
width
,
height
,
wined3dformat_from_d3dformat
(
format
),
usage
&
WINED3DUSAGE_MASK
,
(
enum
wined3d_pool
)
pool
,
multisample_type
,
multisample_quality
,
WINED3D_SURFACE_TYPE_OPENGL
,
flags
,
surface
,
&
d3d9_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
flags
,
surface
,
&
d3d9_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/ddraw.c
View file @
ce912d51
...
...
@@ -5187,9 +5187,9 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
return
E_FAIL
;
}
if
(
SUCCEEDED
(
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
width
,
height
,
format_id
,
usage
,
WINED3D_POOL_DEFAULT
,
multisample_type
,
multisample_quality
,
DefaultSurfaceType
,
WINED3D_SURFACE_MAPPABLE
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
surface
)))
if
(
SUCCEEDED
(
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
width
,
height
,
format_id
,
usage
,
WINED3D_POOL_DEFAULT
,
multisample_type
,
multisample_quality
,
WINED3D_SURFACE_MAPPABLE
,
ddraw
,
&
ddraw_frontbuffer_parent_ops
,
surface
)))
ddraw
->
wined3d_frontbuffer
=
*
surface
;
return
hr
;
...
...
dlls/ddraw/surface.c
View file @
ce912d51
...
...
@@ -5785,7 +5785,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, D
surface
->
first_attached
=
surface
;
if
(
FAILED
(
hr
=
wined3d_surface_create
(
ddraw
->
wined3d_device
,
desc
->
dwWidth
,
desc
->
dwHeight
,
format
,
usage
,
pool
,
WINED3D_MULTISAMPLE_NONE
,
0
,
DefaultSurfaceType
,
flags
,
surface
,
usage
,
pool
,
WINED3D_MULTISAMPLE_NONE
,
0
,
flags
,
surface
,
&
ddraw_surface_wined3d_parent_ops
,
&
surface
->
wined3d_surface
)))
{
WARN
(
"Failed to create wined3d surface, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/device.c
View file @
ce912d51
...
...
@@ -914,7 +914,7 @@ static void device_load_logo(struct wined3d_device *device, const char *filename
}
hr
=
wined3d_surface_create
(
device
,
bm
.
bmWidth
,
bm
.
bmHeight
,
WINED3DFMT_B5G6R5_UNORM
,
0
,
WINED3D_POOL_SYSTEM_MEM
,
WINED3D_MULTISAMPLE_NONE
,
0
,
WINED3D_SURFACE_
TYPE_OPENGL
,
WINED3D_SURFACE_
MAPPABLE
,
WINED3D_POOL_SYSTEM_MEM
,
WINED3D_MULTISAMPLE_NONE
,
0
,
WINED3D_SURFACE_MAPPABLE
,
NULL
,
&
wined3d_null_parent_ops
,
&
device
->
logo_surface
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/surface.c
View file @
ce912d51
...
...
@@ -3722,7 +3722,7 @@ static struct wined3d_surface *surface_convert_format(struct wined3d_surface *so
/* FIXME: Multisampled conversion? */
if
(
FAILED
(
hr
=
wined3d_surface_create
(
source
->
resource
.
device
,
source
->
resource
.
width
,
source
->
resource
.
height
,
to_fmt
,
0
,
WINED3D_POOL_SCRATCH
,
WINED3D_MULTISAMPLE_NONE
,
0
,
source
->
surface_type
,
to_fmt
,
0
,
WINED3D_POOL_SCRATCH
,
WINED3D_MULTISAMPLE_NONE
,
0
,
WINED3D_SURFACE_MAPPABLE
|
WINED3D_SURFACE_DISCARD
,
NULL
,
&
wined3d_null_parent_ops
,
&
ret
)))
{
ERR
(
"Failed to create a destination surface for conversion.
\n
"
);
...
...
@@ -7103,9 +7103,9 @@ const struct blit_shader cpu_blit = {
cpu_blit_depth_fill
,
};
static
HRESULT
surface_init
(
struct
wined3d_surface
*
surface
,
enum
wined3d_surface_type
surface_type
,
UINT
alignment
,
UINT
width
,
UINT
height
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
static
HRESULT
surface_init
(
struct
wined3d_surface
*
surface
,
UINT
alignment
,
UINT
width
,
UINT
height
,
enum
wined3d_multisample_type
multisample_type
,
UINT
multisample_quality
,
struct
wined3d_device
*
device
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -7164,22 +7164,10 @@ static HRESULT surface_init(struct wined3d_surface *surface, enum wined3d_surfac
if
(
!
resource_size
)
return
WINED3DERR_INVALIDCALL
;
surface
->
surface_type
=
surface_type
;
switch
(
surface_type
)
{
case
WINED3D_SURFACE_TYPE_OPENGL
:
surface
->
surface_ops
=
&
surface_ops
;
break
;
case
WINED3D_SURFACE_TYPE_GDI
:
surface
->
surface_ops
=
&
gdi_surface_ops
;
break
;
default:
ERR
(
"Requested unknown surface implementation %#x.
\n
"
,
surface_type
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
device
->
wined3d
->
flags
&
WINED3D_NO3D
)
surface
->
surface_ops
=
&
gdi_surface_ops
;
else
surface
->
surface_ops
=
&
surface_ops
;
hr
=
resource_init
(
&
surface
->
resource
,
device
,
WINED3D_RTYPE_SURFACE
,
format
,
multisample_type
,
multisample_quality
,
usage
,
pool
,
width
,
height
,
1
,
...
...
@@ -7245,9 +7233,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, enum wined3d_surfac
HRESULT
CDECL
wined3d_surface_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
enum
wined3d_pool
pool
,
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
enum
wined3d_surface_type
surface_type
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
)
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
)
{
struct
wined3d_surface
*
object
;
HRESULT
hr
;
...
...
@@ -7256,13 +7243,7 @@ HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width,
device
,
width
,
height
,
debug_d3dformat
(
format_id
));
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, flags %#x, parent %p, parent_ops %p.
\n
"
,
surface_type
,
flags
,
parent
,
parent_ops
);
if
(
surface_type
==
WINED3D_SURFACE_TYPE_OPENGL
&&
!
device
->
adapter
)
{
ERR
(
"OpenGL surfaces are not available without OpenGL.
\n
"
);
return
WINED3DERR_NOTAVAILABLE
;
}
TRACE
(
"flags %#x, parent %p, parent_ops %p.
\n
"
,
flags
,
parent
,
parent_ops
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -7271,8 +7252,8 @@ HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width,
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
if
(
FAILED
(
hr
=
surface_init
(
object
,
surface_type
,
device
->
surface_alignment
,
width
,
height
,
multisample_
type
,
multisample_
quality
,
device
,
usage
,
format_id
,
pool
,
flags
,
parent
,
parent_ops
)))
if
(
FAILED
(
hr
=
surface_init
(
object
,
device
->
surface_alignment
,
width
,
height
,
multisample_type
,
multisample_quality
,
device
,
usage
,
format_id
,
pool
,
flags
,
parent
,
parent_ops
)))
{
WARN
(
"Failed to initialize surface, returning %#x.
\n
"
,
hr
);
HeapFree
(
GetProcessHeap
(),
0
,
object
);
...
...
dlls/wined3d/wined3d.spec
View file @
ce912d51
...
...
@@ -210,7 +210,7 @@
@ cdecl wined3d_stateblock_incref(ptr)
@ cdecl wined3d_surface_blt(ptr ptr ptr ptr long ptr long)
@ cdecl wined3d_surface_create(ptr long long long long long long long long
long
ptr ptr ptr)
@ cdecl wined3d_surface_create(ptr 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_from_resource(ptr)
...
...
dlls/wined3d/wined3d_private.h
View file @
ce912d51
...
...
@@ -2053,7 +2053,6 @@ struct wined3d_surface
DWORD
flags
;
enum
wined3d_surface_type
surface_type
;
UINT
pow2Width
;
UINT
pow2Height
;
...
...
include/wine/wined3d.h
View file @
ce912d51
...
...
@@ -2339,9 +2339,8 @@ HRESULT __cdecl wined3d_surface_blt(struct wined3d_surface *dst_surface, const R
const
WINEDDBLTFX
*
blt_fx
,
enum
wined3d_texture_filter_type
filter
);
HRESULT
__cdecl
wined3d_surface_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
enum
wined3d_format_id
format_id
,
DWORD
usage
,
enum
wined3d_pool
pool
,
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
enum
wined3d_surface_type
surface_type
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
);
enum
wined3d_multisample_type
multisample_type
,
DWORD
multisample_quality
,
DWORD
flags
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_surface
**
surface
);
ULONG
__cdecl
wined3d_surface_decref
(
struct
wined3d_surface
*
surface
);
HRESULT
__cdecl
wined3d_surface_flip
(
struct
wined3d_surface
*
surface
,
struct
wined3d_surface
*
override
,
DWORD
flags
);
struct
wined3d_surface
*
__cdecl
wined3d_surface_from_resource
(
struct
wined3d_resource
*
resource
);
...
...
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