Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0cbdd10c
Commit
0cbdd10c
authored
May 05, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
May 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WineD3D_PixelFormat typedef.
parent
9f90225f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
context.c
dlls/wined3d/context.c
+5
-3
directx.c
dlls/wined3d/directx.c
+11
-11
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-3
No files found.
dlls/wined3d/context.c
View file @
0cbdd10c
...
...
@@ -1219,10 +1219,12 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
getDepthStencilBits
(
ds_format
,
&
depthBits
,
&
stencilBits
);
for
(
matchtry
=
0
;
matchtry
<
(
sizeof
(
matches
)
/
sizeof
(
matches
[
0
]))
&&
!
iPixelFormat
;
matchtry
++
)
{
for
(
i
=
0
;
i
<
nCfgs
;
i
++
)
{
for
(
matchtry
=
0
;
matchtry
<
(
sizeof
(
matches
)
/
sizeof
(
*
matches
))
&&
!
iPixelFormat
;
++
matchtry
)
{
for
(
i
=
0
;
i
<
nCfgs
;
++
i
)
{
const
struct
wined3d_pixel_format
*
cfg
=
&
This
->
adapter
->
cfgs
[
i
];
BOOL
exactDepthMatch
=
TRUE
;
WineD3D_PixelFormat
*
cfg
=
&
This
->
adapter
->
cfgs
[
i
];
/* For now only accept RGBA formats. Perhaps some day we will
* allow floating point formats for pbuffers. */
...
...
dlls/wined3d/directx.c
View file @
0cbdd10c
...
...
@@ -2932,7 +2932,7 @@ HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d,
}
static
BOOL
IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt
(
const
struct
wined3d_gl_info
*
gl_info
,
const
WineD3D_PixelF
ormat
*
cfg
,
const
struct
wined3d_format
*
format
)
const
struct
wined3d_pixel_f
ormat
*
cfg
,
const
struct
wined3d_format
*
format
)
{
short
redSize
,
greenSize
,
blueSize
,
alphaSize
,
colorBits
;
...
...
@@ -2969,7 +2969,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const struct wined
}
static
BOOL
IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt
(
const
struct
wined3d_gl_info
*
gl_info
,
const
WineD3D_PixelF
ormat
*
cfg
,
const
struct
wined3d_format
*
format
)
const
struct
wined3d_pixel_f
ormat
*
cfg
,
const
struct
wined3d_format
*
format
)
{
short
depthSize
,
stencilSize
;
BOOL
lockable
=
FALSE
;
...
...
@@ -3033,7 +3033,7 @@ HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d,
}
else
{
const
WineD3D_PixelF
ormat
*
cfgs
;
const
struct
wined3d_pixel_f
ormat
*
cfgs
;
unsigned
int
cfg_count
;
unsigned
int
i
;
...
...
@@ -3094,7 +3094,7 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
if
(
format
->
flags
&
(
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
))
{
const
WineD3D_PixelF
ormat
*
cfgs
;
const
struct
wined3d_pixel_f
ormat
*
cfgs
;
unsigned
int
i
,
cfg_count
;
cfgs
=
adapter
->
cfgs
;
...
...
@@ -3118,7 +3118,7 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3
else
if
(
format
->
flags
&
WINED3DFMT_FLAG_RENDERTARGET
)
{
short
redSize
,
greenSize
,
blueSize
,
alphaSize
,
colorBits
;
const
WineD3D_PixelF
ormat
*
cfgs
;
const
struct
wined3d_pixel_f
ormat
*
cfgs
;
unsigned
int
i
,
cfg_count
;
if
(
!
getColorBits
(
format
,
&
redSize
,
&
greenSize
,
&
blueSize
,
&
alphaSize
,
&
colorBits
))
...
...
@@ -3187,7 +3187,7 @@ static BOOL CheckDepthStencilCapability(const struct wined3d_adapter *adapter,
/* Walk through all WGL pixel formats to find a match */
for
(
it
=
0
;
it
<
adapter
->
nCfgs
;
++
it
)
{
WineD3D_PixelF
ormat
*
cfg
=
&
adapter
->
cfgs
[
it
];
const
struct
wined3d_pixel_f
ormat
*
cfg
=
&
adapter
->
cfgs
[
it
];
if
(
IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt
(
&
adapter
->
gl_info
,
cfg
,
display_format
))
{
if
(
IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt
(
&
adapter
->
gl_info
,
cfg
,
ds_format
))
...
...
@@ -3217,10 +3217,10 @@ static BOOL CheckRenderTargetCapability(const struct wined3d_adapter *adapter,
if
(
!
(
check_format
->
flags
&
WINED3DFMT_FLAG_RENDERTARGET
))
return
FALSE
;
if
(
wined3d_settings
.
offscreen_rendering_mode
==
ORM_BACKBUFFER
)
{
WineD3D_PixelFormat
*
cfgs
=
adapter
->
cfgs
;
int
it
;
short
AdapterRed
,
AdapterGreen
,
AdapterBlue
,
AdapterAlpha
,
AdapterTotalSize
;
short
CheckRed
,
CheckGreen
,
CheckBlue
,
CheckAlpha
,
CheckTotalSize
;
const
struct
wined3d_pixel_format
*
cfgs
=
adapter
->
cfgs
;
int
it
;
getColorBits
(
adapter_format
,
&
AdapterRed
,
&
AdapterGreen
,
&
AdapterBlue
,
&
AdapterAlpha
,
&
AdapterTotalSize
);
getColorBits
(
check_format
,
&
CheckRed
,
&
CheckGreen
,
&
CheckBlue
,
&
CheckAlpha
,
&
CheckTotalSize
);
...
...
@@ -5140,10 +5140,10 @@ static BOOL InitAdapters(struct wined3d *wined3d)
struct
wined3d_adapter
*
adapter
=
&
wined3d
->
adapters
[
0
];
const
struct
wined3d_gl_info
*
gl_info
=
&
adapter
->
gl_info
;
struct
wined3d_fake_gl_ctx
fake_gl_ctx
=
{
0
};
struct
wined3d_pixel_format
*
cfgs
;
int
iPixelFormat
;
int
res
;
int
i
;
WineD3D_PixelFormat
*
cfgs
;
DISPLAY_DEVICEW
DisplayDevice
;
HDC
hdc
;
...
...
@@ -5202,7 +5202,7 @@ static BOOL InitAdapters(struct wined3d *wined3d)
attribute
=
WGL_NUMBER_PIXEL_FORMATS_ARB
;
GL_EXTCALL
(
wglGetPixelFormatAttribivARB
(
hdc
,
0
,
0
,
1
,
&
attribute
,
&
adapter
->
nCfgs
));
adapter
->
cfgs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
adapter
->
nCfgs
*
sizeof
(
WineD3D_PixelFormat
));
adapter
->
cfgs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
adapter
->
nCfgs
*
sizeof
(
*
adapter
->
cfgs
));
cfgs
=
adapter
->
cfgs
;
attribs
[
nAttribs
++
]
=
WGL_RED_BITS_ARB
;
attribs
[
nAttribs
++
]
=
WGL_GREEN_BITS_ARB
;
...
...
@@ -5262,7 +5262,7 @@ static BOOL InitAdapters(struct wined3d *wined3d)
else
{
int
nCfgs
=
DescribePixelFormat
(
hdc
,
0
,
0
,
0
);
adapter
->
cfgs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
nCfgs
*
sizeof
(
WineD3D_PixelFormat
));
adapter
->
cfgs
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
nCfgs
*
sizeof
(
*
adapter
->
cfgs
));
adapter
->
nCfgs
=
0
;
/* We won't accept all formats e.g. software accelerated ones will be skipped */
cfgs
=
adapter
->
cfgs
;
...
...
dlls/wined3d/wined3d_private.h
View file @
0cbdd10c
...
...
@@ -1263,7 +1263,7 @@ struct wined3d_light_info
/* The default light parameters */
extern
const
WINED3DLIGHT
WINED3D_default_light
DECLSPEC_HIDDEN
;
typedef
struct
WineD3D_PixelF
ormat
struct
wined3d_pixel_f
ormat
{
int
iPixelFormat
;
/* WGL pixel format */
int
iPixelType
;
/* WGL pixel type e.g. WGL_TYPE_RGBA_ARB, WGL_TYPE_RGBA_FLOAT_ARB or WGL_TYPE_COLORINDEX_ARB */
...
...
@@ -1273,7 +1273,7 @@ typedef struct WineD3D_PixelFormat
BOOL
doubleBuffer
;
int
auxBuffers
;
int
numSamples
;
}
WineD3D_PixelF
ormat
;
}
wined3d_pixel_f
ormat
;
/* The driver names reflect the lowest GPU supported
* by a certain driver, so DRIVER_AMD_R300 supports
...
...
@@ -1528,7 +1528,7 @@ struct wined3d_adapter
struct
wined3d_driver_info
driver_info
;
WCHAR
DeviceName
[
CCHDEVICENAME
];
/* DeviceName for use with e.g. ChangeDisplaySettings */
int
nCfgs
;
WineD3D_PixelFormat
*
cfgs
;
struct
wined3d_pixel_format
*
cfgs
;
BOOL
brokenStencil
;
/* Set on cards which only offer mixed depth+stencil */
unsigned
int
TextureRam
;
/* Amount of texture memory both video ram + AGP/TurboCache/HyperMemory/.. */
unsigned
int
UsedTextureRam
;
...
...
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