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
45bf9527
Commit
45bf9527
authored
Oct 30, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store resource bind flags in the wined3d_resource structure.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
22b3a4f0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
buffer.c
dlls/wined3d/buffer.c
+6
-7
resource.c
dlls/wined3d/resource.c
+3
-2
texture.c
dlls/wined3d/texture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
No files found.
dlls/wined3d/buffer.c
View file @
45bf9527
...
...
@@ -155,11 +155,11 @@ static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *bu
* rarely. */
if
(
resource
->
bind_count
)
{
if
(
buffer_gl
->
b
.
bind_flags
&
WINED3D_BIND_VERTEX_BUFFER
)
if
(
resource
->
bind_flags
&
WINED3D_BIND_VERTEX_BUFFER
)
device_invalidate_state
(
resource
->
device
,
STATE_STREAMSRC
);
if
(
buffer_gl
->
b
.
bind_flags
&
WINED3D_BIND_INDEX_BUFFER
)
if
(
resource
->
bind_flags
&
WINED3D_BIND_INDEX_BUFFER
)
device_invalidate_state
(
resource
->
device
,
STATE_INDEXBUFFER
);
if
(
buffer_gl
->
b
.
bind_flags
&
WINED3D_BIND_CONSTANT_BUFFER
)
if
(
resource
->
bind_flags
&
WINED3D_BIND_CONSTANT_BUFFER
)
{
device_invalidate_state
(
resource
->
device
,
STATE_CONSTANT_BUFFER
(
WINED3D_SHADER_TYPE_VERTEX
));
device_invalidate_state
(
resource
->
device
,
STATE_CONSTANT_BUFFER
(
WINED3D_SHADER_TYPE_HULL
));
...
...
@@ -168,7 +168,7 @@ static void wined3d_buffer_gl_destroy_buffer_object(struct wined3d_buffer_gl *bu
device_invalidate_state
(
resource
->
device
,
STATE_CONSTANT_BUFFER
(
WINED3D_SHADER_TYPE_PIXEL
));
device_invalidate_state
(
resource
->
device
,
STATE_CONSTANT_BUFFER
(
WINED3D_SHADER_TYPE_COMPUTE
));
}
if
(
buffer_gl
->
b
.
bind_flags
&
WINED3D_BIND_STREAM_OUTPUT
)
if
(
resource
->
bind_flags
&
WINED3D_BIND_STREAM_OUTPUT
)
{
device_invalidate_state
(
resource
->
device
,
STATE_STREAM_OUTPUT
);
if
(
context
->
transform_feedback_active
)
...
...
@@ -1379,13 +1379,12 @@ static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, struct wined3d
}
if
(
FAILED
(
hr
=
resource_init
(
resource
,
device
,
WINED3D_RTYPE_BUFFER
,
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
desc
->
usage
,
desc
->
access
,
desc
->
byte_width
,
1
,
1
,
desc
->
byte_width
,
parent
,
parent_ops
,
&
buffer_resource_ops
)))
WINED3D_MULTISAMPLE_NONE
,
0
,
desc
->
usage
,
desc
->
bind_flags
,
desc
->
access
,
desc
->
byte_width
,
1
,
1
,
desc
->
byte_width
,
parent
,
parent_ops
,
&
buffer_resource_ops
)))
{
WARN
(
"Failed to initialize resource, hr %#x.
\n
"
,
hr
);
return
hr
;
}
buffer
->
bind_flags
=
desc
->
bind_flags
;
buffer
->
structure_byte_stride
=
desc
->
structure_byte_stride
;
buffer
->
locations
=
data
?
WINED3D_LOCATION_DISCARDED
:
WINED3D_LOCATION_SYSMEM
;
...
...
dlls/wined3d/resource.c
View file @
45bf9527
...
...
@@ -56,8 +56,8 @@ static void resource_check_usage(DWORD usage)
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
unsigned
int
multisample_quality
,
unsigned
int
usage
,
unsigned
int
access
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
,
enum
wined3d_multisample_type
multisample_type
,
unsigned
int
multisample_quality
,
unsigned
int
usage
,
unsigned
int
bind_flags
,
unsigned
int
access
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
,
unsigned
int
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
{
...
...
@@ -183,6 +183,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource
->
multisample_type
=
multisample_type
;
resource
->
multisample_quality
=
multisample_quality
;
resource
->
usage
=
usage
;
resource
->
bind_flags
=
bind_flags
;
resource
->
access
=
access
;
resource
->
width
=
width
;
resource
->
height
=
height
;
...
...
dlls/wined3d/texture.c
View file @
45bf9527
...
...
@@ -2996,7 +2996,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
return
WINED3DERR_INVALIDCALL
;
if
(
FAILED
(
hr
=
resource_init
(
&
texture
->
resource
,
device
,
desc
->
resource_type
,
format
,
desc
->
multisample_type
,
desc
->
multisample_quality
,
desc
->
usage
,
desc
->
access
,
desc
->
multisample_type
,
desc
->
multisample_quality
,
desc
->
usage
,
0
,
desc
->
access
,
desc
->
width
,
desc
->
height
,
desc
->
depth
,
offset
,
parent
,
parent_ops
,
&
texture_resource_ops
)))
{
static
unsigned
int
once
;
...
...
dlls/wined3d/wined3d_private.h
View file @
45bf9527
...
...
@@ -3113,6 +3113,7 @@ struct wined3d_resource
enum
wined3d_multisample_type
multisample_type
;
UINT
multisample_quality
;
DWORD
usage
;
unsigned
int
bind_flags
;
unsigned
int
access
;
WORD
draw_binding
;
WORD
map_binding
;
...
...
@@ -3153,8 +3154,8 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource)
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
HRESULT
resource_init
(
struct
wined3d_resource
*
resource
,
struct
wined3d_device
*
device
,
enum
wined3d_resource_type
type
,
const
struct
wined3d_format
*
format
,
enum
wined3d_multisample_type
multisample_type
,
unsigned
int
multisample_quality
,
unsigned
int
usage
,
unsigned
int
access
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
,
enum
wined3d_multisample_type
multisample_type
,
unsigned
int
multisample_quality
,
unsigned
int
usage
,
unsigned
int
bind_flags
,
unsigned
int
access
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
,
unsigned
int
size
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
DECLSPEC_HIDDEN
;
void
resource_unload
(
struct
wined3d_resource
*
resource
)
DECLSPEC_HIDDEN
;
...
...
@@ -3772,7 +3773,6 @@ struct wined3d_buffer
{
struct
wined3d_resource
resource
;
unsigned
int
bind_flags
;
unsigned
int
structure_byte_stride
;
DWORD
flags
;
DWORD
locations
;
...
...
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