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
6bb32e47
Commit
6bb32e47
authored
Jan 20, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the core gl*CompressedTex* functions.
parent
5883c9ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
13 deletions
+23
-13
directx.c
dlls/wined3d/directx.c
+10
-0
surface.c
dlls/wined3d/surface.c
+11
-11
texture.c
dlls/wined3d/texture.c
+2
-2
No files found.
dlls/wined3d/directx.c
View file @
6bb32e47
...
...
@@ -2878,9 +2878,14 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC
(
glBufferData
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glBufferSubData
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glColorMaski
)
/* OpenGL 3.0 */
USE_GL_FUNC
(
glCompressedTexImage2D
)
/* OpenGL 1.3 */
USE_GL_FUNC
(
glCompressedTexImage3D
)
/* OpenGL 1.3 */
USE_GL_FUNC
(
glCompressedTexSubImage2D
)
/* OpenGL 1.3 */
USE_GL_FUNC
(
glCompressedTexSubImage3D
)
/* OpenGL 1.3 */
USE_GL_FUNC
(
glDeleteBuffers
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glGenBuffers
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glGetBufferSubData
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glGetCompressedTexImage
)
/* OpenGL 1.3 */
USE_GL_FUNC
(
glMapBuffer
)
/* OpenGL 1.5 */
USE_GL_FUNC
(
glUnmapBuffer
)
/* OpenGL 1.5 */
#undef USE_GL_FUNC
...
...
@@ -2907,9 +2912,14 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
MAP_GL_FUNCTION
(
glBufferData
,
glBufferDataARB
);
MAP_GL_FUNCTION
(
glBufferSubData
,
glBufferSubDataARB
);
MAP_GL_FUNCTION
(
glColorMaski
,
glColorMaskIndexedEXT
);
MAP_GL_FUNCTION
(
glCompressedTexImage2D
,
glCompressedTexImage2DARB
);
MAP_GL_FUNCTION
(
glCompressedTexImage3D
,
glCompressedTexImage3DARB
);
MAP_GL_FUNCTION
(
glCompressedTexSubImage2D
,
glCompressedTexSubImage2DARB
);
MAP_GL_FUNCTION
(
glCompressedTexSubImage3D
,
glCompressedTexSubImage3DARB
);
MAP_GL_FUNCTION
(
glDeleteBuffers
,
glDeleteBuffersARB
);
MAP_GL_FUNCTION
(
glGenBuffers
,
glGenBuffersARB
);
MAP_GL_FUNCTION
(
glGetBufferSubData
,
glGetBufferSubDataARB
);
MAP_GL_FUNCTION
(
glGetCompressedTexImage
,
glGetCompressedTexImageARB
);
MAP_GL_FUNCTION
(
glMapBuffer
,
glMapBufferARB
);
MAP_GL_FUNCTION
(
glUnmapBuffer
,
glUnmapBufferARB
);
#undef MAP_GL_FUNCTION
...
...
dlls/wined3d/surface.c
View file @
6bb32e47
...
...
@@ -1334,23 +1334,23 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
if
(
format
->
flags
&
WINED3DFMT_FLAG_COMPRESSED
)
{
TRACE
(
"(%p) : Calling glGetCompressedTexImage
ARB
level %d, format %#x, type %#x, data %p.
\n
"
,
TRACE
(
"(%p) : Calling glGetCompressedTexImage level %d, format %#x, type %#x, data %p.
\n
"
,
surface
,
surface
->
texture_level
,
format
->
glFormat
,
format
->
glType
,
data
.
addr
);
if
(
data
.
buffer_object
)
{
GL_EXTCALL
(
glBindBuffer
(
GL_PIXEL_PACK_BUFFER
,
data
.
buffer_object
));
checkGLcall
(
"glBindBuffer"
);
GL_EXTCALL
(
glGetCompressedTexImage
ARB
(
surface
->
texture_target
,
surface
->
texture_level
,
NULL
));
checkGLcall
(
"glGetCompressedTexImage
ARB
"
);
GL_EXTCALL
(
glGetCompressedTexImage
(
surface
->
texture_target
,
surface
->
texture_level
,
NULL
));
checkGLcall
(
"glGetCompressedTexImage"
);
GL_EXTCALL
(
glBindBuffer
(
GL_PIXEL_PACK_BUFFER
,
0
));
checkGLcall
(
"glBindBuffer"
);
}
else
{
GL_EXTCALL
(
glGetCompressedTexImage
ARB
(
surface
->
texture_target
,
GL_EXTCALL
(
glGetCompressedTexImage
(
surface
->
texture_target
,
surface
->
texture_level
,
data
.
addr
));
checkGLcall
(
"glGetCompressedTexImage
ARB
"
);
checkGLcall
(
"glGetCompressedTexImage"
);
}
}
else
...
...
@@ -1515,30 +1515,30 @@ void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct w
else
internal
=
format
->
glInternal
;
TRACE
(
"glCompressedTexSubImage2D
ARB
, target %#x, level %d, x %d, y %d, w %d, h %d, "
TRACE
(
"glCompressedTexSubImage2D, target %#x, level %d, x %d, y %d, w %d, h %d, "
"format %#x, image_size %#x, addr %p.
\n
"
,
surface
->
texture_target
,
surface
->
texture_level
,
dst_point
->
x
,
dst_point
->
y
,
update_w
,
update_h
,
internal
,
row_count
*
row_length
,
addr
);
if
(
row_length
==
src_pitch
)
{
GL_EXTCALL
(
glCompressedTexSubImage2D
ARB
(
surface
->
texture_target
,
surface
->
texture_level
,
GL_EXTCALL
(
glCompressedTexSubImage2D
(
surface
->
texture_target
,
surface
->
texture_level
,
dst_point
->
x
,
dst_point
->
y
,
update_w
,
update_h
,
internal
,
row_count
*
row_length
,
addr
));
}
else
{
UINT
row
,
y
;
/* glCompressedTexSubImage2D
ARB
() ignores pixel store state, so we
* can't use the unpack row length like
below
. */
/* glCompressedTexSubImage2D() ignores pixel store state, so we
* can't use the unpack row length like
for glTexSubImage2D
. */
for
(
row
=
0
,
y
=
dst_point
->
y
;
row
<
row_count
;
++
row
)
{
GL_EXTCALL
(
glCompressedTexSubImage2D
ARB
(
surface
->
texture_target
,
surface
->
texture_level
,
GL_EXTCALL
(
glCompressedTexSubImage2D
(
surface
->
texture_target
,
surface
->
texture_level
,
dst_point
->
x
,
y
,
update_w
,
format
->
block_height
,
internal
,
row_length
,
addr
));
y
+=
format
->
block_height
;
addr
+=
src_pitch
;
}
}
checkGLcall
(
"glCompressedTexSubImage2D
ARB
"
);
checkGLcall
(
"glCompressedTexSubImage2D"
);
}
else
{
...
...
dlls/wined3d/texture.c
View file @
6bb32e47
...
...
@@ -885,9 +885,9 @@ static void texture2d_prepare_texture(struct wined3d_texture *texture, struct wi
if
(
format
->
flags
&
WINED3DFMT_FLAG_COMPRESSED
&&
mem
)
{
GL_EXTCALL
(
glCompressedTexImage2D
ARB
(
surface
->
texture_target
,
surface
->
texture_level
,
GL_EXTCALL
(
glCompressedTexImage2D
(
surface
->
texture_target
,
surface
->
texture_level
,
internal
,
width
,
height
,
0
,
surface
->
resource
.
size
,
mem
));
checkGLcall
(
"glCompressedTexImage2D
ARB
"
);
checkGLcall
(
"glCompressedTexImage2D"
);
}
else
{
...
...
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