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
ac871305
Commit
ac871305
authored
Aug 22, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the mipmap level in the volume.
parent
0473a072
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
45 additions
and
33 deletions
+45
-33
device.c
dlls/d3d10core/device.c
+5
-3
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-1
device.c
dlls/d3d8/device.c
+3
-3
volume.c
dlls/d3d8/volume.c
+2
-2
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-1
device.c
dlls/d3d9/device.c
+3
-3
volume.c
dlls/d3d9/volume.c
+4
-3
ddraw.c
dlls/ddraw/ddraw.c
+3
-2
texture.c
dlls/wined3d/texture.c
+3
-3
volume.c
dlls/wined3d/volume.c
+13
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
wined3d.h
include/wine/wined3d.h
+3
-3
No files found.
dlls/d3d10core/device.c
View file @
ac871305
...
...
@@ -1887,8 +1887,9 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
}
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
HRESULT
hr
;
...
...
@@ -1898,7 +1899,8 @@ static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *d
format
,
pool
,
usage
,
volume
);
hr
=
wined3d_volume_create
(
device_from_wined3d_device_parent
(
device_parent
)
->
wined3d_device
,
width
,
height
,
depth
,
usage
,
format
,
pool
,
NULL
,
&
d3d10_subresource_parent_ops
,
volume
);
width
,
height
,
depth
,
level
,
usage
,
format
,
pool
,
NULL
,
&
d3d10_subresource_parent_ops
,
volume
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create wined3d volume, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d8/d3d8_private.h
View file @
ac871305
...
...
@@ -184,7 +184,8 @@ struct d3d8_volume
};
HRESULT
volume_init
(
struct
d3d8_volume
*
volume
,
struct
d3d8_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
struct
d3d8_swapchain
{
...
...
dlls/d3d8/device.c
View file @
ac871305
...
...
@@ -2987,8 +2987,8 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
}
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level
,
enum
wined3d_
format_id
format
,
enum
wined3d_
pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
struct
d3d8_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d8_volume
*
object
;
...
...
@@ -3008,7 +3008,7 @@ static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *d
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
usage
,
format
,
pool
);
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
level
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize volume, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d8/volume.c
View file @
ac871305
...
...
@@ -284,14 +284,14 @@ static const struct wined3d_parent_ops d3d8_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
struct
d3d8_volume
*
volume
,
struct
d3d8_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
{
HRESULT
hr
;
volume
->
IDirect3DVolume8_iface
.
lpVtbl
=
&
d3d8_volume_vtbl
;
volume
->
refcount
=
1
;
hr
=
wined3d_volume_create
(
device
->
wined3d_device
,
width
,
height
,
depth
,
usage
,
hr
=
wined3d_volume_create
(
device
->
wined3d_device
,
width
,
height
,
depth
,
level
,
usage
,
format
,
pool
,
volume
,
&
d3d8_volume_wined3d_parent_ops
,
&
volume
->
wined3d_volume
);
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/d3d9_private.h
View file @
ac871305
...
...
@@ -176,7 +176,8 @@ struct d3d9_volume
};
HRESULT
volume_init
(
struct
d3d9_volume
*
volume
,
struct
d3d9_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
DECLSPEC_HIDDEN
;
struct
d3d9_swapchain
{
...
...
dlls/d3d9/device.c
View file @
ac871305
...
...
@@ -3375,8 +3375,8 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
}
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level
,
enum
wined3d_
format_id
format
,
enum
wined3d_
pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
struct
d3d9_device
*
device
=
device_from_device_parent
(
device_parent
);
struct
d3d9_volume
*
object
;
...
...
@@ -3396,7 +3396,7 @@ static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *d
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
usage
,
format
,
pool
);
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
level
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize volume, hr %#x.
\n
"
,
hr
);
...
...
dlls/d3d9/volume.c
View file @
ac871305
...
...
@@ -275,15 +275,16 @@ static const struct wined3d_parent_ops d3d9_volume_wined3d_parent_ops =
};
HRESULT
volume_init
(
struct
d3d9_volume
*
volume
,
struct
d3d9_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
)
{
HRESULT
hr
;
volume
->
IDirect3DVolume9_iface
.
lpVtbl
=
&
d3d9_volume_vtbl
;
volume
->
refcount
=
1
;
hr
=
wined3d_volume_create
(
device
->
wined3d_device
,
width
,
height
,
depth
,
usage
&
WINED3DUSAGE_MASK
,
format
,
pool
,
volume
,
&
d3d9_volume_wined3d_parent_ops
,
&
volume
->
wined3d_volume
);
hr
=
wined3d_volume_create
(
device
->
wined3d_device
,
width
,
height
,
depth
,
level
,
usage
&
WINED3DUSAGE_MASK
,
format
,
pool
,
volume
,
&
d3d9_volume_wined3d_parent_ops
,
&
volume
->
wined3d_volume
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create wined3d volume, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/ddraw.c
View file @
ac871305
...
...
@@ -5190,8 +5190,9 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic
}
static
HRESULT
CDECL
device_parent_create_volume
(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level
,
enum
wined3d_format_id
format
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
)
{
TRACE
(
"device_parent %p, container_parent %p, width %u, height %u, depth %u, "
"format %#x, pool %#x, usage %#x, volume %p.
\n
"
,
...
...
dlls/wined3d/texture.c
View file @
ac871305
...
...
@@ -1086,7 +1086,7 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
{
for
(
i
=
0
;
i
<
texture
->
level_count
;
++
i
)
{
volume_load
(
volume_from_resource
(
texture
->
sub_resources
[
i
]),
context
,
i
,
wined3d_volume_load
(
volume_from_resource
(
texture
->
sub_resources
[
i
]),
context
,
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
);
}
}
...
...
@@ -1096,7 +1096,7 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
{
struct
wined3d_volume
*
volume
=
volume_from_resource
(
texture
->
sub_resources
[
i
]);
volume_add_dirty_box
(
volume
,
NULL
);
volume_load
(
volume
,
context
,
i
,
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
);
wined3d_volume_load
(
volume
,
context
,
texture
->
flags
&
WINED3D_TEXTURE_IS_SRGB
);
}
}
else
...
...
@@ -1252,7 +1252,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct
/* Create the volume. */
hr
=
device
->
device_parent
->
ops
->
create_volume
(
device
->
device_parent
,
parent
,
tmp_w
,
tmp_h
,
tmp_d
,
desc
->
format
,
desc
->
pool
,
desc
->
usage
,
&
volume
);
tmp_w
,
tmp_h
,
tmp_d
,
i
,
desc
->
format
,
desc
->
pool
,
desc
->
usage
,
&
volume
);
if
(
FAILED
(
hr
))
{
ERR
(
"Creating a volume for the volume texture failed, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/volume.c
View file @
ac871305
...
...
@@ -3,6 +3,7 @@
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2009-2011 Henri Verbeet for CodeWeavers
* Copyright 2013 Stefan Dösinger for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -77,17 +78,18 @@ void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture
}
/* Context activation is done by the caller. */
void
volume_load
(
const
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
UINT
level
,
BOOL
srgb_mode
)
void
wined3d_volume_load
(
const
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_format
*
format
=
volume
->
resource
.
format
;
TRACE
(
"volume %p, context %p, level %u, srgb %#x, format %s (%#x).
\n
"
,
volume
,
context
,
level
,
srgb_mode
,
debug_d3dformat
(
format
->
id
),
format
->
id
);
volume
,
context
,
volume
->
texture_level
,
srgb_mode
,
debug_d3dformat
(
format
->
id
),
format
->
id
);
volume_bind_and_dirtify
(
volume
,
context
);
GL_EXTCALL
(
glTexImage3DEXT
(
GL_TEXTURE_3D
,
level
,
format
->
glInternal
,
GL_EXTCALL
(
glTexImage3DEXT
(
GL_TEXTURE_3D
,
volume
->
texture_
level
,
format
->
glInternal
,
volume
->
resource
.
width
,
volume
->
resource
.
height
,
volume
->
resource
.
depth
,
0
,
format
->
glFormat
,
format
->
glType
,
volume
->
resource
.
allocatedMemory
));
checkGLcall
(
"glTexImage3D"
);
...
...
@@ -267,8 +269,8 @@ static const struct wined3d_resource_ops volume_resource_ops =
};
static
HRESULT
volume_init
(
struct
wined3d_volume
*
volume
,
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
UINT
height
,
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
const
struct
wined3d_format
*
format
=
wined3d_get_format
(
gl_info
,
format_id
);
...
...
@@ -295,13 +297,15 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
memset
(
&
volume
->
lockedBox
,
0
,
sizeof
(
volume
->
lockedBox
));
volume_add_dirty_box
(
volume
,
NULL
);
volume
->
texture_level
=
level
;
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_volume_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
)
UINT
depth
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
)
{
struct
wined3d_volume
*
object
;
HRESULT
hr
;
...
...
@@ -317,7 +321,8 @@ HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, U
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
hr
=
volume_init
(
object
,
device
,
width
,
height
,
depth
,
level
,
usage
,
format_id
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize volume, returning %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/wined3d_private.h
View file @
ac871305
...
...
@@ -2061,6 +2061,7 @@ struct wined3d_volume
struct
wined3d_box
dirtyBox
;
DWORD
flags
;
GLint
texture_level
;
};
static
inline
struct
wined3d_volume
*
volume_from_resource
(
struct
wined3d_resource
*
resource
)
...
...
@@ -2069,7 +2070,7 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
}
void
volume_add_dirty_box
(
struct
wined3d_volume
*
volume
,
const
struct
wined3d_box
*
dirty_box
)
DECLSPEC_HIDDEN
;
void
volume_load
(
const
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
UINT
level
,
BOOL
srgb_mode
)
DECLSPEC_HIDDEN
;
void
wined3d_volume_load
(
const
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
DECLSPEC_HIDDEN
;
void
volume_set_container
(
struct
wined3d_volume
*
volume
,
struct
wined3d_texture
*
container
)
DECLSPEC_HIDDEN
;
struct
wined3d_surface_dib
...
...
include/wine/wined3d.h
View file @
ac871305
...
...
@@ -1987,8 +1987,8 @@ struct wined3d_device_parent_ops
const
struct
wined3d_resource_desc
*
desc
,
UINT
sub_resource_idx
,
DWORD
flags
,
struct
wined3d_surface
**
surface
);
HRESULT
(
__cdecl
*
create_volume
)(
struct
wined3d_device_parent
*
device_parent
,
void
*
container_parent
,
UINT
width
,
UINT
height
,
UINT
depth
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
);
UINT
width
,
UINT
height
,
UINT
depth
,
UINT
level
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
DWORD
usage
,
struct
wined3d_volume
**
volume
);
HRESULT
(
__cdecl
*
create_swapchain
)(
struct
wined3d_device_parent
*
device_parent
,
struct
wined3d_swapchain_desc
*
desc
,
struct
wined3d_swapchain
**
swapchain
);
};
...
...
@@ -2408,7 +2408,7 @@ void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex
ULONG
__cdecl
wined3d_vertex_declaration_incref
(
struct
wined3d_vertex_declaration
*
declaration
);
HRESULT
__cdecl
wined3d_volume_create
(
struct
wined3d_device
*
device
,
UINT
width
,
UINT
height
,
UINT
depth
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
UINT
level
,
DWORD
usage
,
enum
wined3d_format_id
format_id
,
enum
wined3d_pool
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
struct
wined3d_volume
**
volume
);
ULONG
__cdecl
wined3d_volume_decref
(
struct
wined3d_volume
*
volume
);
struct
wined3d_volume
*
__cdecl
wined3d_volume_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