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
af8401ba
Commit
af8401ba
authored
Aug 19, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce WINED3D_TEXTURE_DOWNLOADABLE.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ebe31c79
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
surface.c
dlls/wined3d/surface.c
+2
-3
texture.c
dlls/wined3d/texture.c
+11
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/surface.c
View file @
af8401ba
...
...
@@ -2522,9 +2522,8 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
TRACE
(
"Not doing download because of format conversion.
\n
"
);
else
if
(
src_texture
->
resource
.
format
->
conv_byte_count
)
TRACE
(
"Not doing download because the source format needs conversion.
\n
"
);
else
if
(
wined3d_texture_gl_is_multisample_location
(
wined3d_texture_gl
(
src_texture
),
WINED3D_LOCATION_TEXTURE_RGB
))
TRACE
(
"Not doing download because of multisample source.
\n
"
);
else
if
(
!
(
src_texture
->
flags
&
WINED3D_TEXTURE_DOWNLOADABLE
))
TRACE
(
"Not doing download because texture is not downloadable.
\n
"
);
else
if
(
!
texture2d_is_full_rect
(
src_texture
,
src_sub_resource_idx
%
src_texture
->
level_count
,
&
src_rect
))
TRACE
(
"Not doing download because of partial download (src).
\n
"
);
else
if
(
!
texture2d_is_full_rect
(
dst_texture
,
dst_sub_resource_idx
%
dst_texture
->
level_count
,
&
dst_rect
))
...
...
dlls/wined3d/texture.c
View file @
af8401ba
...
...
@@ -1602,9 +1602,15 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
if
(
texture
->
texture_ops
==
&
texture_gl_ops
)
{
if
(
multisample_type
&&
gl_info
->
supported
[
ARB_TEXTURE_MULTISAMPLE
])
{
wined3d_texture_gl
(
texture
)
->
target
=
GL_TEXTURE_2D_MULTISAMPLE
;
texture
->
flags
&=
~
WINED3D_TEXTURE_DOWNLOADABLE
;
}
else
{
wined3d_texture_gl
(
texture
)
->
target
=
GL_TEXTURE_2D
;
texture
->
flags
|=
WINED3D_TEXTURE_DOWNLOADABLE
;
}
}
if
(((
width
&
(
width
-
1
))
||
(
height
&
(
height
-
1
)))
&&
!
d3d_info
->
texture_npot
...
...
@@ -3223,7 +3229,8 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
texture
->
layer_count
=
layer_count
;
texture
->
level_count
=
level_count
;
texture
->
lod
=
0
;
texture
->
flags
|=
WINED3D_TEXTURE_POW2_MAT_IDENT
|
WINED3D_TEXTURE_NORMALIZED_COORDS
;
texture
->
flags
|=
WINED3D_TEXTURE_POW2_MAT_IDENT
|
WINED3D_TEXTURE_NORMALIZED_COORDS
|
WINED3D_TEXTURE_DOWNLOADABLE
;
if
(
flags
&
WINED3D_TEXTURE_CREATE_GET_DC_LENIENT
)
texture
->
flags
|=
WINED3D_TEXTURE_PIN_SYSMEM
|
WINED3D_TEXTURE_GET_DC_LENIENT
;
if
(
flags
&
(
WINED3D_TEXTURE_CREATE_GET_DC
|
WINED3D_TEXTURE_CREATE_GET_DC_LENIENT
))
...
...
@@ -3658,6 +3665,9 @@ HRESULT wined3d_texture_gl_init(struct wined3d_texture_gl *texture_gl, struct wi
if
(
texture_gl
->
t
.
resource
.
gl_type
==
WINED3D_GL_RES_TYPE_TEX_RECT
)
texture_gl
->
target
=
GL_TEXTURE_RECTANGLE_ARB
;
if
(
texture_gl
->
target
==
GL_TEXTURE_2D_MULTISAMPLE_ARRAY
||
texture_gl
->
target
==
GL_TEXTURE_2D_MULTISAMPLE
)
texture_gl
->
t
.
flags
&=
~
WINED3D_TEXTURE_DOWNLOADABLE
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
af8401ba
...
...
@@ -3506,6 +3506,7 @@ struct wined3d_texture_ops
#define WINED3D_TEXTURE_DISCARD 0x00002000
#define WINED3D_TEXTURE_GET_DC 0x00004000
#define WINED3D_TEXTURE_GENERATE_MIPMAPS 0x00008000
#define WINED3D_TEXTURE_DOWNLOADABLE 0x00010000
#define WINED3D_TEXTURE_ASYNC_COLOR_KEY 0x00000001
...
...
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