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
7930553e
Commit
7930553e
authored
Dec 03, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store texture sub-resource buffer objects as uintptr_t.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2b01830f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
texture.c
dlls/wined3d/texture.c
+10
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/texture.c
View file @
7930553e
...
...
@@ -477,13 +477,15 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
static
void
wined3d_texture_remove_buffer_object
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
const
struct
wined3d_gl_info
*
gl_info
)
{
GLuint
*
buffer_object
=
&
texture
->
sub_resources
[
sub_resource_idx
].
buffer_object
;
uintptr_t
*
buffer_object
=
&
texture
->
sub_resources
[
sub_resource_idx
].
buffer_object
;
GLuint
bo
;
GL_EXTCALL
(
glDeleteBuffers
(
1
,
buffer_object
));
bo
=
*
buffer_object
;
GL_EXTCALL
(
glDeleteBuffers
(
1
,
&
bo
));
checkGLcall
(
"glDeleteBuffers"
);
TRACE
(
"Deleted buffer object %u for texture %p, sub-resource %u.
\n
"
,
*
buffer_object
,
texture
,
sub_resource_idx
);
bo
,
texture
,
sub_resource_idx
);
wined3d_texture_invalidate_location
(
texture
,
sub_resource_idx
,
WINED3D_LOCATION_BUFFER
);
*
buffer_object
=
0
;
...
...
@@ -1670,19 +1672,20 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
unsigned
int
sub_resource_idx
,
const
struct
wined3d_gl_info
*
gl_info
)
{
struct
wined3d_texture_sub_resource
*
sub_resource
;
GLuint
bo
;
sub_resource
=
&
texture
->
sub_resources
[
sub_resource_idx
];
if
(
sub_resource
->
buffer_object
)
return
;
GL_EXTCALL
(
glGenBuffers
(
1
,
&
sub_resource
->
buffer_object
));
GL_EXTCALL
(
glBindBuffer
(
GL_PIXEL_UNPACK_BUFFER
,
sub_resource
->
buffer_object
));
GL_EXTCALL
(
glGenBuffers
(
1
,
&
bo
));
GL_EXTCALL
(
glBindBuffer
(
GL_PIXEL_UNPACK_BUFFER
,
bo
));
GL_EXTCALL
(
glBufferData
(
GL_PIXEL_UNPACK_BUFFER
,
sub_resource
->
size
,
NULL
,
GL_STREAM_DRAW
));
GL_EXTCALL
(
glBindBuffer
(
GL_PIXEL_UNPACK_BUFFER
,
0
));
checkGLcall
(
"Create buffer object"
);
TRACE
(
"Created buffer object %u for texture %p, sub-resource %u.
\n
"
,
sub_resource
->
buffer_object
,
texture
,
sub_resource_idx
);
sub_resource
->
buffer_object
=
bo
;
TRACE
(
"Created buffer object %u for texture %p, sub-resource %u.
\n
"
,
bo
,
texture
,
sub_resource_idx
);
}
static
void
wined3d_texture_force_reload
(
struct
wined3d_texture
*
texture
)
...
...
dlls/wined3d/wined3d_private.h
View file @
7930553e
...
...
@@ -3563,7 +3563,7 @@ struct wined3d_texture
unsigned
int
map_count
;
uint32_t
map_flags
;
DWORD
locations
;
GLuin
t
buffer_object
;
uintptr_
t
buffer_object
;
}
*
sub_resources
;
};
...
...
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