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
7d23c8a4
Commit
7d23c8a4
authored
Apr 06, 2016
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of wined3d_texture_ops.texture_sub_resource_load().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d8570638
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
49 deletions
+3
-49
surface.c
dlls/wined3d/surface.c
+0
-21
texture.c
dlls/wined3d/texture.c
+3
-15
volume.c
dlls/wined3d/volume.c
+0
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-5
No files found.
dlls/wined3d/surface.c
View file @
7d23c8a4
...
...
@@ -1422,27 +1422,6 @@ void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, const
checkGLcall
(
"set_compatible_renderbuffer"
);
}
/* Context activation is done by the caller. */
void
surface_load
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
DWORD
location
=
srgb
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
;
TRACE
(
"surface %p, srgb %#x.
\n
"
,
surface
,
srgb
);
if
(
surface
->
container
->
resource
.
pool
==
WINED3D_POOL_SCRATCH
)
ERR
(
"Not supported on scratch surfaces.
\n
"
);
if
(
surface_get_sub_resource
(
surface
)
->
locations
&
location
)
{
TRACE
(
"surface is already in texture
\n
"
);
return
;
}
TRACE
(
"Reloading because surface is dirty.
\n
"
);
surface_load_location
(
surface
,
context
,
location
);
surface_evict_sysmem
(
surface
);
}
/* See also float_16_to_32() in wined3d_private.h */
static
inline
unsigned
short
float_32_to_16
(
const
float
*
in
)
{
...
...
dlls/wined3d/texture.c
View file @
7d23c8a4
...
...
@@ -663,7 +663,9 @@ void wined3d_texture_load(struct wined3d_texture *texture,
/* Reload the surfaces if the texture is marked dirty. */
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
texture
->
texture_ops
->
texture_sub_resource_load
(
texture
->
sub_resources
[
i
].
resource
,
context
,
srgb
);
if
(
!
texture
->
texture_ops
->
texture_load_location
(
texture
,
i
,
context
,
srgb
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
))
ERR
(
"Failed to load location (srgb %#x).
\n
"
,
srgb
);
}
texture
->
flags
|=
flag
;
}
...
...
@@ -1087,12 +1089,6 @@ static HRESULT wined3d_texture_upload_data(struct wined3d_texture *texture,
return
WINED3D_OK
;
}
static
void
texture2d_sub_resource_load
(
struct
wined3d_resource
*
sub_resource
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
surface_load
(
surface_from_resource
(
sub_resource
),
context
,
srgb
);
}
static
void
texture2d_sub_resource_upload_data
(
struct
wined3d_resource
*
sub_resource
,
const
struct
wined3d_context
*
context
,
const
struct
wined3d_sub_resource_data
*
data
)
{
...
...
@@ -1203,7 +1199,6 @@ static void texture2d_cleanup_sub_resources(struct wined3d_texture *texture)
static
const
struct
wined3d_texture_ops
texture2d_ops
=
{
texture2d_sub_resource_load
,
texture2d_sub_resource_upload_data
,
texture2d_load_location
,
texture2d_prepare_location
,
...
...
@@ -1689,12 +1684,6 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3
return
WINED3D_OK
;
}
static
void
texture3d_sub_resource_load
(
struct
wined3d_resource
*
sub_resource
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
wined3d_volume_load
(
volume_from_resource
(
sub_resource
),
context
,
srgb
);
}
static
void
texture3d_sub_resource_upload_data
(
struct
wined3d_resource
*
sub_resource
,
const
struct
wined3d_context
*
context
,
const
struct
wined3d_sub_resource_data
*
data
)
{
...
...
@@ -1766,7 +1755,6 @@ static void texture3d_cleanup_sub_resources(struct wined3d_texture *texture)
static
const
struct
wined3d_texture_ops
texture3d_ops
=
{
texture3d_sub_resource_load
,
texture3d_sub_resource_upload_data
,
texture3d_load_location
,
texture3d_prepare_location
,
...
...
dlls/wined3d/volume.c
View file @
7d23c8a4
...
...
@@ -355,14 +355,6 @@ done:
return
TRUE
;
}
/* Context activation is done by the caller. */
void
wined3d_volume_load
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
{
wined3d_texture_prepare_texture
(
volume
->
container
,
context
,
srgb_mode
);
wined3d_volume_load_location
(
volume
,
context
,
srgb_mode
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
);
}
void
wined3d_volume_cleanup
(
struct
wined3d_volume
*
volume
)
{
TRACE
(
"volume %p.
\n
"
,
volume
);
...
...
dlls/wined3d/wined3d_private.h
View file @
7d23c8a4
...
...
@@ -2416,8 +2416,6 @@ struct gl_texture
struct
wined3d_texture_ops
{
void
(
*
texture_sub_resource_load
)(
struct
wined3d_resource
*
sub_resource
,
struct
wined3d_context
*
context
,
BOOL
srgb
);
void
(
*
texture_sub_resource_upload_data
)(
struct
wined3d_resource
*
sub_resource
,
const
struct
wined3d_context
*
context
,
const
struct
wined3d_sub_resource_data
*
data
);
BOOL
(
*
texture_load_location
)(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
...
...
@@ -2580,8 +2578,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
void
wined3d_volume_cleanup
(
struct
wined3d_volume
*
volume
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_volume_init
(
struct
wined3d_volume
*
volume
,
struct
wined3d_texture
*
container
,
const
struct
wined3d_resource_desc
*
desc
,
UINT
level
)
DECLSPEC_HIDDEN
;
void
wined3d_volume_load
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
DECLSPEC_HIDDEN
;
BOOL
wined3d_volume_load_location
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
BOOL
wined3d_volume_prepare_location
(
struct
wined3d_volume
*
volume
,
...
...
@@ -2698,7 +2694,6 @@ void surface_get_drawable_size(const struct wined3d_surface *surface, const stru
HRESULT
wined3d_surface_init
(
struct
wined3d_surface
*
surface
,
struct
wined3d_texture
*
container
,
const
struct
wined3d_resource_desc
*
desc
,
GLenum
target
,
unsigned
int
level
,
unsigned
int
layer
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
surface_load
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
void
surface_load_fb_texture
(
struct
wined3d_surface
*
surface
,
BOOL
srgb
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
HRESULT
surface_load_location
(
struct
wined3d_surface
*
surface
,
...
...
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