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
cc884e0a
Commit
cc884e0a
authored
Jul 30, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Jul 30, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate that the texture is no larger than the graphics cards largest
supported texture.
parent
7eb81fab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
device.c
dlls/wined3d/device.c
+17
-2
directx.c
dlls/wined3d/directx.c
+5
-1
No files found.
dlls/wined3d/device.c
View file @
cc884e0a
...
...
@@ -591,6 +591,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
MultisampleQuality
=
0
;
}
/** FIXME: Check that the format is supported
* by the device.
*******************************/
/* TODO: add support for dxt2 and dxt4 formats */
if
(
Format
==
D3DFMT_DXT2
||
Format
==
D3DFMT_DXT4
)
return
D3DERR_NOTAVAILABLE
;
/* Non-power2 support */
/* Find the nearest pow2 match */
...
...
@@ -608,7 +614,17 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
}
}
/** TODO: Check against the maximum texture sizes supported by the video card **/
/** Check against the maximum texture sizes supported by the video card **/
if
(
pow2Width
>
GL_LIMITS
(
texture_size
)
||
pow2Height
>
GL_LIMITS
(
texture_size
))
{
/* one of three options
1: Do the same as we do with nonpow 2 and scale the texture, (any texture ops would require the texture to be scaled which is potentially slow)
2: Set the texture to the maxium size (bad idea)
3: WARN and return D3DERR_NOTAVAILABLE;
*/
WARN
(
"(%p) Application requested a surface w %d, h %d, but the graphics card only supports %d
\n
"
,
This
,
Width
,
Height
,
GL_LIMITS
(
texture_size
));
return
D3DERR_NOTAVAILABLE
;
}
/** DXTn mipmaps use the same number of 'levels' down to eg. 8x1, but since
...
...
@@ -1206,7 +1222,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevice* ifac
object
->
presentParms
.
PresentationInterval
=
*
(
pPresentationParameters
->
PresentationInterval
);
/* FIXME: check for any failures */
/*********************
* Create the back, front and stencil buffers
*******************/
...
...
dlls/wined3d/directx.c
View file @
cc884e0a
...
...
@@ -1586,9 +1586,13 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
IWineD3DStateBlock_AddRef
((
IWineD3DStateBlock
*
)
object
->
updateStateBlock
);
/* Setup surfaces for the backbuffer, frontbuffer and depthstencil buffer */
/* Setup some defaults for creating the implicite swapchain */
ENTER_GL
();
IWineD3DImpl_FillGLCaps
(
&
This
->
gl_info
,
IWineD3DImpl_GetAdapterDisplay
(
iface
,
Adapter
));
LEAVE_GL
();
/* Setup the implicit swapchain */
TRACE
(
"Creating implicit swapchain
\n
"
);
if
(
D3D_OK
!=
D3DCB_CreateAdditionalSwapChain
((
IUnknown
*
)
object
->
parent
,
pPresentationParameters
,
(
IWineD3DSwapChain
**
)
&
swapchain
)
||
swapchain
==
NULL
)
{
WARN
(
"Failed to create implicite swapchain
\n
"
);
goto
create_device_error
;
...
...
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