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
1f8a3b04
Commit
1f8a3b04
authored
Jun 25, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move texture2d_load_renderbuffer() to texture.c.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
973d96eb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
42 deletions
+39
-42
surface.c
dlls/wined3d/surface.c
+0
-39
texture.c
dlls/wined3d/texture.c
+39
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-2
No files found.
dlls/wined3d/surface.c
View file @
1f8a3b04
...
...
@@ -1423,45 +1423,6 @@ static HRESULT wined3d_texture_blt_special(struct wined3d_texture *dst_texture,
}
/* Context activation is done by the caller. */
BOOL
texture2d_load_renderbuffer
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
{
unsigned
int
level
=
sub_resource_idx
%
texture
->
level_count
;
const
RECT
rect
=
{
0
,
0
,
wined3d_texture_get_level_width
(
texture
,
level
),
wined3d_texture_get_level_height
(
texture
,
level
)};
struct
wined3d_texture_sub_resource
*
sub_resource
;
DWORD
src_location
,
locations
;
sub_resource
=
&
texture
->
sub_resources
[
sub_resource_idx
];
locations
=
sub_resource
->
locations
;
if
(
texture
->
resource
.
bind_flags
&
WINED3D_BIND_DEPTH_STENCIL
)
{
FIXME
(
"Unimplemented copy from %s for depth/stencil buffers.
\n
"
,
wined3d_debug_location
(
locations
));
return
FALSE
;
}
if
(
locations
&
WINED3D_LOCATION_RB_MULTISAMPLE
)
src_location
=
WINED3D_LOCATION_RB_MULTISAMPLE
;
else
if
(
locations
&
WINED3D_LOCATION_RB_RESOLVED
)
src_location
=
WINED3D_LOCATION_RB_RESOLVED
;
else
if
(
locations
&
WINED3D_LOCATION_TEXTURE_SRGB
)
src_location
=
WINED3D_LOCATION_TEXTURE_SRGB
;
else
if
(
locations
&
WINED3D_LOCATION_TEXTURE_RGB
)
src_location
=
WINED3D_LOCATION_TEXTURE_RGB
;
else
if
(
locations
&
WINED3D_LOCATION_DRAWABLE
)
src_location
=
WINED3D_LOCATION_DRAWABLE
;
else
/* texture2d_blt_fbo() will load the source location if necessary. */
src_location
=
WINED3D_LOCATION_TEXTURE_RGB
;
texture2d_blt_fbo
(
texture
->
resource
.
device
,
context
,
WINED3D_TEXF_POINT
,
texture
,
sub_resource_idx
,
src_location
,
&
rect
,
texture
,
sub_resource_idx
,
dst_location
,
&
rect
);
return
TRUE
;
}
/* Context activation is done by the caller. */
static
void
fbo_blitter_destroy
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_context
*
context
)
{
struct
wined3d_blitter
*
next
;
...
...
dlls/wined3d/texture.c
View file @
1f8a3b04
...
...
@@ -2528,6 +2528,44 @@ static BOOL wined3d_texture_load_drawable(struct wined3d_texture *texture,
return
TRUE
;
}
static
BOOL
wined3d_texture_load_renderbuffer
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
{
unsigned
int
level
=
sub_resource_idx
%
texture
->
level_count
;
const
RECT
rect
=
{
0
,
0
,
wined3d_texture_get_level_width
(
texture
,
level
),
wined3d_texture_get_level_height
(
texture
,
level
)};
struct
wined3d_texture_sub_resource
*
sub_resource
;
DWORD
src_location
,
locations
;
sub_resource
=
&
texture
->
sub_resources
[
sub_resource_idx
];
locations
=
sub_resource
->
locations
;
if
(
texture
->
resource
.
bind_flags
&
WINED3D_BIND_DEPTH_STENCIL
)
{
FIXME
(
"Unimplemented copy from %s for depth/stencil buffers.
\n
"
,
wined3d_debug_location
(
locations
));
return
FALSE
;
}
if
(
locations
&
WINED3D_LOCATION_RB_MULTISAMPLE
)
src_location
=
WINED3D_LOCATION_RB_MULTISAMPLE
;
else
if
(
locations
&
WINED3D_LOCATION_RB_RESOLVED
)
src_location
=
WINED3D_LOCATION_RB_RESOLVED
;
else
if
(
locations
&
WINED3D_LOCATION_TEXTURE_SRGB
)
src_location
=
WINED3D_LOCATION_TEXTURE_SRGB
;
else
if
(
locations
&
WINED3D_LOCATION_TEXTURE_RGB
)
src_location
=
WINED3D_LOCATION_TEXTURE_RGB
;
else
if
(
locations
&
WINED3D_LOCATION_DRAWABLE
)
src_location
=
WINED3D_LOCATION_DRAWABLE
;
else
/* texture2d_blt_fbo() will load the source location if necessary. */
src_location
=
WINED3D_LOCATION_TEXTURE_RGB
;
texture2d_blt_fbo
(
texture
->
resource
.
device
,
context
,
WINED3D_TEXF_POINT
,
texture
,
sub_resource_idx
,
src_location
,
&
rect
,
texture
,
sub_resource_idx
,
dst_location
,
&
rect
);
return
TRUE
;
}
static
BOOL
wined3d_texture_gl_load_texture
(
struct
wined3d_texture_gl
*
texture_gl
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context_gl
*
context_gl
,
BOOL
srgb
)
{
...
...
@@ -2702,7 +2740,7 @@ static BOOL wined3d_texture_gl_load_location(struct wined3d_texture *texture,
case
WINED3D_LOCATION_RB_RESOLVED
:
case
WINED3D_LOCATION_RB_MULTISAMPLE
:
return
texture2d
_load_renderbuffer
(
texture
,
sub_resource_idx
,
context
,
location
);
return
wined3d_texture
_load_renderbuffer
(
texture
,
sub_resource_idx
,
context
,
location
);
case
WINED3D_LOCATION_TEXTURE_RGB
:
case
WINED3D_LOCATION_TEXTURE_SRGB
:
...
...
dlls/wined3d/wined3d_private.h
View file @
1f8a3b04
...
...
@@ -3551,8 +3551,6 @@ void texture2d_get_blt_info(const struct wined3d_texture_gl *texture_gl, unsigne
const
RECT
*
rect
,
struct
wined3d_blt_info
*
info
)
DECLSPEC_HIDDEN
;
void
texture2d_load_fb_texture
(
struct
wined3d_texture_gl
*
texture_gl
,
unsigned
int
sub_resource_idx
,
BOOL
srgb
,
struct
wined3d_context
*
context
)
DECLSPEC_HIDDEN
;
BOOL
texture2d_load_renderbuffer
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
dst_location
)
DECLSPEC_HIDDEN
;
void
texture2d_read_from_framebuffer
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
src_location
,
DWORD
dst_location
)
DECLSPEC_HIDDEN
;
...
...
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