Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
480e4e5b
Commit
480e4e5b
authored
12 years ago
by
Józef Kucia
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3dx9: Correctly check if a cube texture is dynamic in D3DXCreateCubeTextureFromFileInMemoryEx.
parent
eb55412f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3dx9_36/tests/texture.c
+18
-0
18 additions, 0 deletions
dlls/d3dx9_36/tests/texture.c
dlls/d3dx9_36/texture.c
+3
-1
3 additions, 1 deletion
dlls/d3dx9_36/texture.c
with
21 additions
and
1 deletion
dlls/d3dx9_36/tests/texture.c
+
18
−
0
View file @
480e4e5b
...
...
@@ -1290,6 +1290,23 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device)
}
else
skip
(
"Couldn't create cube texture
\n
"
);
}
static
void
test_D3DXCreateCubeTextureFromFileInMemoryEx
(
IDirect3DDevice9
*
device
)
{
HRESULT
hr
;
IDirect3DCubeTexture9
*
cube_texture
;
if
(
!
is_autogenmipmap_supported
(
device
,
D3DRTYPE_CUBETEXTURE
))
{
skip
(
"No D3DUSAGE_AUTOGENMIPMAP support for cube textures
\n
"
);
return
;
}
hr
=
D3DXCreateCubeTextureFromFileInMemoryEx
(
device
,
dds_cube_map
,
sizeof
(
dds_cube_map
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DUSAGE_DYNAMIC
|
D3DUSAGE_AUTOGENMIPMAP
,
D3DFMT_UNKNOWN
,
D3DPOOL_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
cube_texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DCubeTexture9_Release
(
cube_texture
);
}
static
void
test_D3DXCreateVolumeTextureFromFileInMemory
(
IDirect3DDevice9
*
device
)
{
HRESULT
hr
;
...
...
@@ -1377,6 +1394,7 @@ START_TEST(texture)
test_D3DXCreateTextureFromFileInMemory
(
device
);
test_D3DXCreateTextureFromFileInMemoryEx
(
device
);
test_D3DXCreateCubeTextureFromFileInMemory
(
device
);
test_D3DXCreateCubeTextureFromFileInMemoryEx
(
device
);
test_D3DXCreateVolumeTextureFromFileInMemory
(
device
);
IDirect3DDevice9_Release
(
device
);
...
...
This diff is collapsed.
Click to expand it.
dlls/d3dx9_36/texture.c
+
3
−
1
View file @
480e4e5b
...
...
@@ -1124,6 +1124,7 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
D3DCAPS9
caps
;
UINT
loaded_miplevels
;
D3DXIMAGE_INFO
img_info
;
BOOL
dynamic_texture
;
BOOL
file_size
=
FALSE
;
BOOL
file_format
=
FALSE
;
BOOL
file_mip_levels
=
FALSE
;
...
...
@@ -1191,7 +1192,8 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device,
mip_levels
=
img_info
.
MipLevels
;
}
if
(
pool
==
D3DPOOL_DEFAULT
&&
!
((
caps
.
Caps2
&
D3DCAPS2_DYNAMICTEXTURES
)
&&
usage
==
D3DUSAGE_DYNAMIC
))
dynamic_texture
=
(
caps
.
Caps2
&
D3DCAPS2_DYNAMICTEXTURES
)
&&
(
usage
&
D3DUSAGE_DYNAMIC
);
if
(
pool
==
D3DPOOL_DEFAULT
&&
!
dynamic_texture
)
{
hr
=
D3DXCreateCubeTexture
(
device
,
size
,
mip_levels
,
usage
,
format
,
D3DPOOL_SYSTEMMEM
,
&
buftex
);
tex
=
buftex
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment