Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
03c1422a
Commit
03c1422a
authored
Nov 06, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of WINED3DUSAGE_TEXTURE.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a0d6ef5b
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
11 additions
and
37 deletions
+11
-37
buffer.c
dlls/d3d11/buffer.c
+1
-1
d3d11_private.h
dlls/d3d11/d3d11_private.h
+1
-1
texture.c
dlls/d3d11/texture.c
+3
-3
utils.c
dlls/d3d11/utils.c
+1
-9
texture.c
dlls/d3d8/texture.c
+1
-3
texture.c
dlls/d3d9/texture.c
+1
-3
surface.c
dlls/ddraw/surface.c
+0
-3
device.c
dlls/dxgi/device.c
+0
-2
directx.c
dlls/wined3d/directx.c
+0
-4
resource.c
dlls/wined3d/resource.c
+0
-1
swapchain.c
dlls/wined3d/swapchain.c
+0
-2
utils.c
dlls/wined3d/utils.c
+0
-1
wined3d.h
include/wine/wined3d.h
+3
-4
No files found.
dlls/d3d11/buffer.c
View file @
03c1422a
...
...
@@ -450,7 +450,7 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev
return
E_INVALIDARG
;
wined3d_desc
.
byte_width
=
buffer
->
desc
.
ByteWidth
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
0
,
buffer
->
desc
.
Usage
);
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
buffer
->
desc
.
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
buffer
->
desc
.
BindFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
buffer
->
desc
.
Usage
,
buffer
->
desc
.
CPUAccessFlags
);
wined3d_desc
.
misc_flags
=
buffer
->
desc
.
MiscFlags
;
...
...
dlls/d3d11/d3d11_private.h
View file @
03c1422a
...
...
@@ -65,7 +65,7 @@ void d3d11_primitive_topology_from_wined3d_primitive_type(enum wined3d_primitive
void
wined3d_primitive_type_from_d3d11_primitive_topology
(
D3D11_PRIMITIVE_TOPOLOGY
topology
,
enum
wined3d_primitive_type
*
type
,
unsigned
int
*
patch_vertex_count
)
DECLSPEC_HIDDEN
;
unsigned
int
wined3d_getdata_flags_from_d3d11_async_getdata_flags
(
unsigned
int
d3d11_flags
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d11
(
UINT
bind_flags
,
enum
D3D11_USAGE
usage
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_usage_from_d3d11
(
enum
D3D11_USAGE
usage
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
wined3d_resource_from_d3d11_resource
(
ID3D11Resource
*
resource
)
DECLSPEC_HIDDEN
;
struct
wined3d_resource
*
wined3d_resource_from_d3d10_resource
(
ID3D10Resource
*
resource
)
DECLSPEC_HIDDEN
;
DWORD
wined3d_map_flags_from_d3d11_map_type
(
D3D11_MAP
map_type
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3d11/texture.c
View file @
03c1422a
...
...
@@ -456,7 +456,7 @@ HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DE
wined3d_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
BindFlags
,
desc
->
Usage
);
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
...
...
@@ -1010,7 +1010,7 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
wined3d_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
wined3d_desc
.
multisample_type
=
desc
->
SampleDesc
.
Count
>
1
?
desc
->
SampleDesc
.
Count
:
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
desc
->
SampleDesc
.
Quality
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
BindFlags
,
desc
->
Usage
);
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
...
...
@@ -1469,7 +1469,7 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi
wined3d_desc
.
format
=
wined3dformat_from_dxgi_format
(
desc
->
Format
);
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
BindFlags
,
desc
->
Usage
);
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
...
...
dlls/d3d11/utils.c
View file @
03c1422a
...
...
@@ -441,18 +441,10 @@ unsigned int wined3d_getdata_flags_from_d3d11_async_getdata_flags(unsigned int d
return
WINED3DGETDATA_FLUSH
;
}
DWORD
wined3d_usage_from_d3d11
(
UINT
bind_flags
,
enum
D3D11_USAGE
usage
)
DWORD
wined3d_usage_from_d3d11
(
enum
D3D11_USAGE
usage
)
{
static
const
DWORD
handled
=
D3D11_BIND_SHADER_RESOURCE
|
D3D11_BIND_RENDER_TARGET
|
D3D11_BIND_DEPTH_STENCIL
;
DWORD
wined3d_usage
=
0
;
if
(
bind_flags
&
D3D11_BIND_SHADER_RESOURCE
)
wined3d_usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
bind_flags
&
~
handled
)
FIXME
(
"Unhandled bind flags %#x.
\n
"
,
bind_flags
&
~
handled
);
if
(
usage
==
D3D11_USAGE_DYNAMIC
)
wined3d_usage
|=
WINED3DUSAGE_DYNAMIC
;
...
...
dlls/d3d8/texture.c
View file @
03c1422a
...
...
@@ -1107,7 +1107,6 @@ HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device,
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
usage
&
WINED3DUSAGE_MASK
;
desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d8_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
@@ -1156,7 +1155,7 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *devic
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
usage
&
WINED3DUSAGE_MASK
;
desc
.
usage
|=
WINED3DUSAGE_LEGACY_CUBEMAP
|
WINED3DUSAGE_TEXTURE
;
desc
.
usage
|=
WINED3DUSAGE_LEGACY_CUBEMAP
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d8_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
@@ -1204,7 +1203,6 @@ HRESULT volumetexture_init(struct d3d8_texture *texture, struct d3d8_device *dev
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
usage
&
WINED3DUSAGE_MASK
;
desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d8_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
dlls/d3d9/texture.c
View file @
03c1422a
...
...
@@ -1311,7 +1311,6 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
wined3dusage_from_d3dusage
(
usage
);
desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d9_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
@@ -1398,7 +1397,7 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
wined3dusage_from_d3dusage
(
usage
);
desc
.
usage
|=
WINED3DUSAGE_LEGACY_CUBEMAP
|
WINED3DUSAGE_TEXTURE
;
desc
.
usage
|=
WINED3DUSAGE_LEGACY_CUBEMAP
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d9_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
@@ -1470,7 +1469,6 @@ HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *dev
desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
desc
.
multisample_quality
=
0
;
desc
.
usage
=
wined3dusage_from_d3dusage
(
usage
);
desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
if
(
pool
==
D3DPOOL_SCRATCH
)
desc
.
usage
|=
WINED3DUSAGE_SCRATCH
;
desc
.
bind_flags
=
wined3d_bind_flags_from_d3d9_usage
(
usage
)
|
WINED3D_BIND_SHADER_RESOURCE
;
...
...
dlls/ddraw/surface.c
View file @
03c1422a
...
...
@@ -6170,10 +6170,7 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
if
(
!
(
ddraw
->
flags
&
DDRAW_NO3D
))
{
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_TEXTURE
)
{
wined3d_desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
wined3d_desc
.
bind_flags
|=
WINED3D_BIND_SHADER_RESOURCE
;
}
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
wined3d_desc
.
bind_flags
|=
WINED3D_BIND_DEPTH_STENCIL
;
else
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_3DDEVICE
)
...
...
dlls/dxgi/device.c
View file @
03c1422a
...
...
@@ -188,8 +188,6 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
&
surface_desc
.
multisample_quality
,
&
desc
->
SampleDesc
);
surface_desc
.
bind_flags
=
wined3d_bind_flags_from_dxgi_usage
(
usage
);
surface_desc
.
usage
=
0
;
if
(
surface_desc
.
bind_flags
&
WINED3D_BIND_SHADER_RESOURCE
)
surface_desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
surface_desc
.
access
=
WINED3D_RESOURCE_ACCESS_GPU
;
surface_desc
.
width
=
desc
->
Width
;
surface_desc
.
height
=
desc
->
Height
;
...
...
dlls/wined3d/directx.c
View file @
03c1422a
...
...
@@ -1541,10 +1541,6 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad
adapter_format
=
wined3d_get_format
(
adapter
,
adapter_format_id
,
WINED3D_BIND_RENDER_TARGET
);
format
=
wined3d_get_format
(
adapter
,
check_format_id
,
bind_flags
);
if
(
usage
&
WINED3DUSAGE_TEXTURE
)
bind_flags
|=
WINED3D_BIND_SHADER_RESOURCE
;
usage
&=
~
WINED3DUSAGE_TEXTURE
;
switch
(
resource_type
)
{
case
WINED3D_RTYPE_NONE
:
...
...
dlls/wined3d/resource.c
View file @
03c1422a
...
...
@@ -37,7 +37,6 @@ static void resource_check_usage(DWORD usage)
|
WINED3DUSAGE_SCRATCH
|
WINED3DUSAGE_PRIVATE
|
WINED3DUSAGE_LEGACY_CUBEMAP
|
WINED3DUSAGE_TEXTURE
|
~
WINED3DUSAGE_MASK
;
/* WINED3DUSAGE_WRITEONLY is supposed to result in write-combined mappings
...
...
dlls/wined3d/swapchain.c
View file @
03c1422a
...
...
@@ -921,8 +921,6 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3
texture_desc
.
usage
=
0
;
if
(
device
->
wined3d
->
flags
&
WINED3D_NO3D
)
texture_desc
.
usage
|=
WINED3DUSAGE_OWNDC
;
if
(
texture_desc
.
bind_flags
&
WINED3D_BIND_SHADER_RESOURCE
)
texture_desc
.
usage
|=
WINED3DUSAGE_TEXTURE
;
for
(
i
=
0
;
i
<
swapchain
->
desc
.
backbuffer_count
;
++
i
)
{
TRACE
(
"Creating back buffer %u.
\n
"
,
i
);
...
...
dlls/wined3d/utils.c
View file @
03c1422a
...
...
@@ -4524,7 +4524,6 @@ const char *debug_d3dusage(DWORD usage)
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_DMAP
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_TEXTAPI
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_LEGACY_CUBEMAP
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_TEXTURE
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_OWNDC
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_STATICDECL
);
WINED3DUSAGE_TO_STR
(
WINED3DUSAGE_OVERLAY
);
...
...
include/wine/wined3d.h
View file @
03c1422a
...
...
@@ -928,10 +928,9 @@ enum wined3d_shader_type
#define WINED3DUSAGE_TEXTAPI 0x10000000
#define WINED3DUSAGE_MASK 0x10007bf8
#define WINED3DUSAGE_SCRATCH 0x00200000
#define WINED3DUSAGE_PRIVATE 0x00400000
#define WINED3DUSAGE_LEGACY_CUBEMAP 0x00800000
#define WINED3DUSAGE_TEXTURE 0x01000000
#define WINED3DUSAGE_SCRATCH 0x00400000
#define WINED3DUSAGE_PRIVATE 0x00800000
#define WINED3DUSAGE_LEGACY_CUBEMAP 0x01000000
#define WINED3DUSAGE_OWNDC 0x02000000
#define WINED3DUSAGE_STATICDECL 0x04000000
#define WINED3DUSAGE_OVERLAY 0x08000000
...
...
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