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
cf442832
Commit
cf442832
authored
Dec 12, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce WINED3D_BIND_INDIRECT_BUFFER.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5b358e0f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
7 deletions
+32
-7
buffer.c
dlls/d3d11/buffer.c
+1
-1
d3d11_private.h
dlls/d3d11/d3d11_private.h
+22
-3
texture.c
dlls/d3d11/texture.c
+3
-3
buffer.c
dlls/wined3d/buffer.c
+4
-0
utils.c
dlls/wined3d/utils.c
+1
-0
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d11/buffer.c
View file @
cf442832
...
...
@@ -448,7 +448,7 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev
wined3d_desc
.
byte_width
=
buffer
->
desc
.
ByteWidth
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
buffer
->
desc
.
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
buffer
->
desc
.
BindFlags
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
buffer
->
desc
.
BindFlags
,
buffer
->
desc
.
MiscFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
buffer
->
desc
.
Usage
,
buffer
->
desc
.
CPUAccessFlags
);
wined3d_desc
.
misc_flags
=
buffer
->
desc
.
MiscFlags
;
wined3d_desc
.
structure_byte_stride
=
buffer
->
desc
.
StructureByteStride
;
...
...
dlls/d3d11/d3d11_private.h
View file @
cf442832
...
...
@@ -92,14 +92,33 @@ HRESULT d3d_set_private_data(struct wined3d_private_store *store,
HRESULT
d3d_set_private_data_interface
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
const
IUnknown
*
object
)
DECLSPEC_HIDDEN
;
static
inline
unsigned
int
wined3d_bind_flags_from_d3d11
(
UINT
bind_flags
)
static
inline
unsigned
int
wined3d_bind_flags_from_d3d11
(
UINT
bind_flags
,
UINT
misc_flags
)
{
return
bind_flags
;
unsigned
int
wined3d_flags
=
bind_flags
&
(
D3D11_BIND_VERTEX_BUFFER
|
D3D11_BIND_INDEX_BUFFER
|
D3D11_BIND_CONSTANT_BUFFER
|
D3D11_BIND_SHADER_RESOURCE
|
D3D11_BIND_STREAM_OUTPUT
|
D3D11_BIND_RENDER_TARGET
|
D3D11_BIND_DEPTH_STENCIL
|
D3D11_BIND_UNORDERED_ACCESS
);
if
(
misc_flags
&
D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS
)
wined3d_flags
|=
WINED3D_BIND_INDIRECT_BUFFER
;
return
wined3d_flags
;
}
static
inline
UINT
d3d11_bind_flags_from_wined3d
(
unsigned
int
bind_flags
)
{
return
bind_flags
;
return
bind_flags
&
(
WINED3D_BIND_VERTEX_BUFFER
|
WINED3D_BIND_INDEX_BUFFER
|
WINED3D_BIND_CONSTANT_BUFFER
|
WINED3D_BIND_SHADER_RESOURCE
|
WINED3D_BIND_STREAM_OUTPUT
|
WINED3D_BIND_RENDER_TARGET
|
WINED3D_BIND_DEPTH_STENCIL
|
WINED3D_BIND_UNORDERED_ACCESS
);
}
/* ID3D11Texture1D, ID3D10Texture1D */
...
...
dlls/d3d11/texture.c
View file @
cf442832
...
...
@@ -454,7 +454,7 @@ HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DE
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
,
desc
->
MiscFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
wined3d_desc
.
width
=
desc
->
Width
;
...
...
@@ -1008,7 +1008,7 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE
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
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
,
desc
->
MiscFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
wined3d_desc
.
width
=
desc
->
Width
;
...
...
@@ -1467,7 +1467,7 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi
wined3d_desc
.
multisample_type
=
WINED3D_MULTISAMPLE_NONE
;
wined3d_desc
.
multisample_quality
=
0
;
wined3d_desc
.
usage
=
wined3d_usage_from_d3d11
(
desc
->
Usage
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
);
wined3d_desc
.
bind_flags
=
wined3d_bind_flags_from_d3d11
(
desc
->
BindFlags
,
desc
->
MiscFlags
);
wined3d_desc
.
access
=
wined3d_access_from_d3d11
(
desc
->
Usage
,
desc
->
Usage
==
D3D11_USAGE_DEFAULT
?
0
:
desc
->
CPUAccessFlags
);
wined3d_desc
.
width
=
desc
->
Width
;
...
...
dlls/wined3d/buffer.c
View file @
cf442832
...
...
@@ -1300,6 +1300,10 @@ GLenum wined3d_buffer_gl_binding_from_bind_flags(const struct wined3d_gl_info *g
if
(
bind_flags
&
WINED3D_BIND_STREAM_OUTPUT
)
return
GL_TRANSFORM_FEEDBACK_BUFFER
;
if
(
bind_flags
&
WINED3D_BIND_INDIRECT_BUFFER
&&
gl_info
->
supported
[
ARB_DRAW_INDIRECT
])
return
GL_DRAW_INDIRECT_BUFFER
;
if
(
bind_flags
&
~
(
WINED3D_BIND_VERTEX_BUFFER
|
WINED3D_BIND_INDEX_BUFFER
))
FIXME
(
"Unhandled bind flags %#x.
\n
"
,
bind_flags
);
...
...
dlls/wined3d/utils.c
View file @
cf442832
...
...
@@ -4687,6 +4687,7 @@ const char *wined3d_debug_bind_flags(DWORD bind_flags)
BIND_FLAG_TO_STR
(
WINED3D_BIND_RENDER_TARGET
);
BIND_FLAG_TO_STR
(
WINED3D_BIND_DEPTH_STENCIL
);
BIND_FLAG_TO_STR
(
WINED3D_BIND_UNORDERED_ACCESS
);
BIND_FLAG_TO_STR
(
WINED3D_BIND_INDIRECT_BUFFER
);
#undef BIND_FLAG_TO_STR
if
(
bind_flags
)
FIXME
(
"Unrecognised bind flag(s) %#x.
\n
"
,
bind_flags
);
...
...
include/wine/wined3d.h
View file @
cf442832
...
...
@@ -914,6 +914,7 @@ enum wined3d_shader_type
#define WINED3D_BIND_RENDER_TARGET 0x00000020
#define WINED3D_BIND_DEPTH_STENCIL 0x00000040
#define WINED3D_BIND_UNORDERED_ACCESS 0x00000080
#define WINED3D_BIND_INDIRECT_BUFFER 0x00000100
#define WINED3DUSAGE_SOFTWAREPROCESSING 0x00000010
#define WINED3DUSAGE_DONOTCLIP 0x00000020
...
...
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