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
826be9ee
Commit
826be9ee
authored
Nov 18, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make "driver private" formats always mappable.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54d63891
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
device.c
dlls/d3d8/tests/device.c
+2
-4
resource.c
dlls/wined3d/resource.c
+2
-0
texture.c
dlls/wined3d/texture.c
+1
-1
utils.c
dlls/wined3d/utils.c
+4
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/d3d8/tests/device.c
View file @
826be9ee
...
...
@@ -9045,11 +9045,9 @@ static void test_resource_access(void)
expected_hr
=
D3D_OK
;
else
expected_hr
=
D3DERR_INVALIDCALL
;
todo_wine_if
(
j
==
1
&&
surface_types
[
i
].
type
!=
SURFACE_IMAGE
)
ok
(
hr
==
expected_hr
,
"Test %s %u: Got unexpected hr %#x.
\n
"
,
surface_types
[
i
].
name
,
j
,
hr
);
ok
(
hr
==
expected_hr
,
"Test %s %u: Got unexpected hr %#x.
\n
"
,
surface_types
[
i
].
name
,
j
,
hr
);
hr
=
IDirect3DSurface8_UnlockRect
(
surface
);
todo_wine_if
((
expected_hr
!=
D3D_OK
&&
surface_types
[
i
].
type
==
SURFACE_2D
)
||
(
j
==
1
&&
surface_types
[
i
].
type
==
SURFACE_CUBE
))
todo_wine_if
(
expected_hr
!=
D3D_OK
&&
surface_types
[
i
].
type
==
SURFACE_2D
)
ok
(
hr
==
expected_hr
,
"Test %s %u: Got unexpected hr %#x.
\n
"
,
surface_types
[
i
].
name
,
j
,
hr
);
if
(
SUCCEEDED
(
IDirect3DSurface8_GetContainer
(
surface
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
texture
)))
...
...
dlls/wined3d/resource.c
View file @
826be9ee
...
...
@@ -186,6 +186,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
multisample_quality
=
multisample_quality
;
resource
->
usage
=
usage
;
resource
->
bind_flags
=
bind_flags
;
if
(
resource
->
format_flags
&
WINED3DFMT_FLAG_MAPPABLE
)
access
|=
WINED3D_RESOURCE_ACCESS_MAP_R
|
WINED3D_RESOURCE_ACCESS_MAP_W
;
resource
->
access
=
access
;
resource
->
width
=
width
;
resource
->
height
=
height
;
...
...
dlls/wined3d/texture.c
View file @
826be9ee
...
...
@@ -3012,7 +3012,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
return
hr
;
}
wined3d_resource_update_draw_binding
(
&
texture
->
resource
);
if
(
(
flags
&
WINED3D_TEXTURE_CREATE_MAPPABLE
)
||
desc
->
format
==
WINED3DFMT_D16_LOCK
ABLE
)
if
(
flags
&
WINED3D_TEXTURE_CREATE_MAPP
ABLE
)
texture
->
resource
.
access
|=
WINED3D_RESOURCE_ACCESS_MAP_R
|
WINED3D_RESOURCE_ACCESS_MAP_W
;
texture
->
texture_ops
=
texture_ops
;
...
...
dlls/wined3d/utils.c
View file @
826be9ee
...
...
@@ -328,8 +328,10 @@ struct wined3d_format_base_flags
* resource size. */
static
const
struct
wined3d_format_base_flags
format_base_flags
[]
=
{
{
WINED3DFMT_ATI1N
,
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_ATI1N
,
WINED3DFMT_FLAG_MAPPABLE
|
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_MAPPABLE
|
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_D16_LOCKABLE
,
WINED3DFMT_FLAG_MAPPABLE
},
{
WINED3DFMT_INTZ
,
WINED3DFMT_FLAG_MAPPABLE
},
{
WINED3DFMT_R11G11B10_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
{
WINED3DFMT_D32_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
{
WINED3DFMT_S8_UINT_D24_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
...
...
dlls/wined3d/wined3d_private.h
View file @
826be9ee
...
...
@@ -4401,6 +4401,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_NORMALISED 0x00800000
#define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000
#define WINED3DFMT_FLAG_BLIT 0x02000000
#define WINED3DFMT_FLAG_MAPPABLE 0x04000000
struct
wined3d_rational
{
...
...
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