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
b90a665d
Commit
b90a665d
authored
Feb 13, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not allocate compressed surfaces with glTexImage2D.
parent
ae332733
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
surface.c
dlls/wined3d/surface.c
+14
-2
No files found.
dlls/wined3d/surface.c
View file @
b90a665d
...
...
@@ -168,8 +168,12 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLsizei width, GLsize
}
else
{
TRACE
(
"(%p) : Calling glCompressedTexSubImage2D w %d, h %d, data %p
\n
"
,
This
,
width
,
height
,
data
);
ENTER_GL
();
GL_EXTCALL
(
glCompressedTexSubImage2DARB
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
0
,
0
,
width
,
height
,
This
->
glDescription
.
glFormatInternal
,
This
->
resource
.
size
,
data
));
/* glCompressedTexSubImage2D for uploading and glTexImage2D for allocating does not work well on some drivers(r200 dri, MacOS ATI driver)
* glCompressedTexImage2D does not accept NULL pointers. So for compressed textures surface_allocate_surface does nothing, and this
* function uses glCompressedTexImage2D instead of the SubImage call
*/
GL_EXTCALL
(
glCompressedTexImage2DARB
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
This
->
glDescription
.
glFormatInternal
,
width
,
height
,
0
/* border */
,
This
->
resource
.
size
,
data
));
checkGLcall
(
"glCompressedTexSubImage2D"
);
LEAVE_GL
();
}
...
...
@@ -186,6 +190,14 @@ static void surface_allocate_surface(IWineD3DSurfaceImpl *This, GLenum internal,
TRACE
(
"(%p) : Creating surface (target %#x) level %d, d3d format %s, internal format %#x, width %d, height %d, gl format %#x, gl type=%#x
\n
"
,
This
,
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
debug_d3dformat
(
This
->
resource
.
format
),
internal
,
width
,
height
,
format
,
type
);
if
(
This
->
resource
.
format
==
WINED3DFMT_DXT1
||
This
->
resource
.
format
==
WINED3DFMT_DXT2
||
This
->
resource
.
format
==
WINED3DFMT_DXT3
||
This
->
resource
.
format
==
WINED3DFMT_DXT4
||
This
->
resource
.
format
==
WINED3DFMT_DXT5
)
{
/* glCompressedTexImage2D does not accept NULL pointers, so we cannot allocate a compressed texture without uploading data */
TRACE
(
"Not allocating compressed surfaces, surface_upload_data will specify them
\n
"
);
return
;
}
ENTER_GL
();
glTexImage2D
(
This
->
glDescription
.
target
,
This
->
glDescription
.
level
,
internal
,
width
,
height
,
0
,
format
,
type
,
NULL
);
...
...
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