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
518ac4c2
Commit
518ac4c2
authored
Aug 22, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move volume data uploading into a separate function.
parent
e08e2b2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
volume.c
dlls/wined3d/volume.c
+28
-7
No files found.
dlls/wined3d/volume.c
View file @
518ac4c2
...
...
@@ -91,15 +91,39 @@ static void wined3d_volume_allocate_texture(const struct wined3d_volume *volume,
}
/* Context activation is done by the caller. */
void
wined3d_volume_load
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
static
void
wined3d_volume_upload_data
(
struct
wined3d_volume
*
volume
,
const
struct
wined3d_context
*
context
,
const
struct
wined3d_bo_address
*
data
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_format
*
format
=
volume
->
resource
.
format
;
TRACE
(
"volume %p, context %p, level %u,
srgb %#x,
format %s (%#x).
\n
"
,
volume
,
context
,
volume
->
texture_level
,
srgb_mode
,
debug_d3dformat
(
format
->
id
),
TRACE
(
"volume %p, context %p, level %u, format %s (%#x).
\n
"
,
volume
,
context
,
volume
->
texture_level
,
debug_d3dformat
(
format
->
id
),
format
->
id
);
if
(
data
->
buffer_object
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_UNPACK_BUFFER_ARB
,
data
->
buffer_object
));
checkGLcall
(
"glBindBufferARB"
);
}
GL_EXTCALL
(
glTexSubImage3DEXT
(
GL_TEXTURE_3D
,
volume
->
texture_level
,
0
,
0
,
0
,
volume
->
resource
.
width
,
volume
->
resource
.
height
,
volume
->
resource
.
depth
,
format
->
glFormat
,
format
->
glType
,
data
->
addr
));
checkGLcall
(
"glTexSubImage3D"
);
if
(
data
->
buffer_object
)
{
GL_EXTCALL
(
glBindBufferARB
(
GL_PIXEL_UNPACK_BUFFER_ARB
,
0
));
checkGLcall
(
"glBindBufferARB"
);
}
}
/* Context activation is done by the caller. */
void
wined3d_volume_load
(
struct
wined3d_volume
*
volume
,
struct
wined3d_context
*
context
,
BOOL
srgb_mode
)
{
struct
wined3d_bo_address
data
=
{
0
,
volume
->
resource
.
allocatedMemory
};
volume_bind_and_dirtify
(
volume
,
context
);
if
(
!
(
volume
->
flags
&
WINED3D_VFLAG_ALLOCATED
))
...
...
@@ -108,10 +132,7 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
volume
->
flags
|=
WINED3D_VFLAG_ALLOCATED
;
}
GL_EXTCALL
(
glTexSubImage3DEXT
(
GL_TEXTURE_3D
,
volume
->
texture_level
,
0
,
0
,
0
,
volume
->
resource
.
width
,
volume
->
resource
.
height
,
volume
->
resource
.
depth
,
format
->
glFormat
,
format
->
glType
,
volume
->
resource
.
allocatedMemory
));
checkGLcall
(
"glTexSubImage3D"
);
wined3d_volume_upload_data
(
volume
,
context
,
&
data
);
}
/* Do not call while under the GL lock. */
...
...
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