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
ef73fe5d
Commit
ef73fe5d
authored
Mar 28, 2008
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a depthstencil flag to the formats table and make use of it in…
wined3d: Add a depthstencil flag to the formats table and make use of it in CheckDepthStencilCapability.
parent
e1bf1cd6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
26 deletions
+20
-26
directx.c
dlls/wined3d/directx.c
+9
-17
utils.c
dlls/wined3d/utils.c
+9
-9
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+2
-0
No files found.
dlls/wined3d/directx.c
View file @
ef73fe5d
...
...
@@ -1887,28 +1887,20 @@ static BOOL CheckBumpMapCapability(UINT Adapter, WINED3DFORMAT CheckFormat)
}
/* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */
static
BOOL
CheckDepthStencilCapability
(
UINT
Adapter
,
WINED3DFORMAT
DisplayFormat
,
WINED3DFORMAT
DepthStencilFormat
)
static
BOOL
CheckDepthStencilCapability
(
UINT
Adapter
,
WINED3DFORMAT
DisplayFormat
,
WINED3DFORMAT
DepthStencilFormat
)
{
int
it
=
0
;
WineD3D_PixelFormat
*
cfgs
=
Adapters
[
Adapter
].
cfgs
;
const
GlPixelFormatDesc
*
glDesc
;
const
StaticPixelFormatDesc
*
desc
=
getFormatDescEntry
(
DepthStencilFormat
,
&
GLINFO_LOCATION
,
&
glDesc
);
/* Only allow depth/stencil formats */
switch
(
DepthStencilFormat
)
{
case
WINED3DFMT_D16_LOCKABLE
:
case
WINED3DFMT_D16
:
case
WINED3DFMT_D15S1
:
case
WINED3DFMT_D24X8
:
case
WINED3DFMT_D24X4S4
:
case
WINED3DFMT_D24S8
:
case
WINED3DFMT_D24FS8
:
case
WINED3DFMT_D32
:
case
WINED3DFMT_D32F_LOCKABLE
:
break
;
/* Fail if we weren't able to get a description of the format */
if
(
!
desc
||
!
glDesc
)
return
FALSE
;
default
:
return
FALSE
;
}
/* Only allow depth/stencil formats */
if
(
!
(
glDesc
->
Flags
&
(
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
)))
return
FALSE
;
/* Walk through all WGL pixel formats to find a match */
cfgs
=
Adapters
[
Adapter
].
cfgs
;
...
...
dlls/wined3d/utils.c
View file @
ef73fe5d
...
...
@@ -232,25 +232,25 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
,
0
},
/* Depth stencil formats */
{
WINED3DFMT_D16_LOCKABLE
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
},
{
WINED3DFMT_D32
,
GL_DEPTH_COMPONENT32_ARB
,
GL_DEPTH_COMPONENT32_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
},
{
WINED3DFMT_D15S1
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
},
{
WINED3DFMT_D24S8
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
},
{
WINED3DFMT_D24X8
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
},
{
WINED3DFMT_D24X4S4
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
},
{
WINED3DFMT_D16
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
WINED3DFMT_FLAG_FILTERING
},
,
WINED3DFMT_FLAG_FILTERING
|
WINED3DFMT_FLAG_DEPTH
},
{
WINED3DFMT_L16
,
GL_LUMINANCE16_EXT
,
GL_LUMINANCE16_EXT
,
0
,
GL_LUMINANCE
,
GL_UNSIGNED_SHORT
,
WINED3DFMT_FLAG_FILTERING
},
{
WINED3DFMT_D32F_LOCKABLE
,
GL_DEPTH_COMPONENT32_ARB
,
GL_DEPTH_COMPONENT32_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_FLOAT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
},
{
WINED3DFMT_D24FS8
,
GL_DEPTH_COMPONENT24_ARB
,
GL_DEPTH_COMPONENT24_ARB
,
0
,
GL_DEPTH_COMPONENT
,
GL_FLOAT
,
0
},
,
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
},
/* Is this a vertex buffer? */
{
WINED3DFMT_VERTEXDATA
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
dlls/wined3d/wined3d_private_types.h
View file @
ef73fe5d
...
...
@@ -33,6 +33,8 @@ typedef enum {
/* WineD3D pixel format flags */
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x1
#define WINED3DFMT_FLAG_FILTERING 0x2
#define WINED3DFMT_FLAG_DEPTH 0x4
#define WINED3DFMT_FLAG_STENCIL 0x8
/** DCL usage masks **/
#define WINED3DSP_DCL_USAGE_SHIFT 0
...
...
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