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
521e3a44
Commit
521e3a44
authored
Jan 06, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Only allow DDSCAPS_MIPMAP on textures.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cac1242a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
0 deletions
+11
-0
surface.c
dlls/ddraw/surface.c
+7
-0
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+1
-0
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+1
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+1
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+1
-0
No files found.
dlls/ddraw/surface.c
View file @
521e3a44
...
...
@@ -5733,6 +5733,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return
DDERR_INVALIDCAPS
;
}
if
((
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_MIPMAP
)
&&
!
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_TEXTURE
))
{
WARN
(
"DDSCAPS_MIPMAP requested without DDSCAPS_TEXTURE.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
texture
);
return
DDERR_INVALIDCAPS
;
}
if
((
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP_ALLFACES
)
&&
!
(
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP
))
{
...
...
dlls/ddraw/tests/ddraw1.c
View file @
521e3a44
...
...
@@ -5003,6 +5003,7 @@ static void test_mipmap(void)
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
3
,
DD_OK
,
3
},
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDPARAMS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
1
},
{
0
,
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDCAPS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
6
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
32
,
64
,
0
,
DD_OK
,
6
},
};
...
...
dlls/ddraw/tests/ddraw2.c
View file @
521e3a44
...
...
@@ -6046,6 +6046,7 @@ static void test_mipmap(void)
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
3
,
DD_OK
,
3
},
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDPARAMS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
1
},
{
0
,
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDCAPS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
6
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
32
,
64
,
0
,
DD_OK
,
6
},
};
...
...
dlls/ddraw/tests/ddraw4.c
View file @
521e3a44
...
...
@@ -7578,6 +7578,7 @@ static void test_mipmap(void)
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
3
,
DD_OK
,
3
},
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDPARAMS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
1
},
{
0
,
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDCAPS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
6
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
32
,
64
,
0
,
DD_OK
,
6
},
};
...
...
dlls/ddraw/tests/ddraw7.c
View file @
521e3a44
...
...
@@ -7427,6 +7427,7 @@ static void test_mipmap(void)
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
3
,
DD_OK
,
3
},
{
DDSD_MIPMAPCOUNT
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDPARAMS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
1
},
{
0
,
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DDERR_INVALIDCAPS
,
0
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
128
,
32
,
0
,
DD_OK
,
8
},
{
0
,
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
,
32
,
64
,
0
,
DD_OK
,
7
},
};
...
...
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