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
13fc2f88
Commit
13fc2f88
authored
Sep 07, 2005
by
Karsten Elfenbein
Committed by
Alexandre Julliard
Sep 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added A2R10G10B10 and D3DFMT_D24FS8 modes to all other functions.
parent
d15d1c4c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
directx.c
dlls/wined3d/directx.c
+6
-0
surface.c
dlls/wined3d/surface.c
+11
-0
utils.c
dlls/wined3d/utils.c
+26
-0
No files found.
dlls/wined3d/directx.c
View file @
13fc2f88
...
...
@@ -993,6 +993,9 @@ static BOOL IWineD3DImpl_IsGLXFBConfigCompatibleWithRenderFmt(WineD3D_Context* c
case
WINED3DFMT_A8R8G8B8
:
if
(
8
==
rb
&&
8
==
gb
&&
8
==
bb
&&
8
==
ab
)
return
TRUE
;
break
;
case
WINED3DFMT_A2R10G10B10
:
if
(
10
==
rb
&&
10
==
gb
&&
10
==
bb
&&
2
==
ab
)
return
TRUE
;
break
;
case
WINED3DFMT_X1R5G5B5
:
if
(
5
==
rb
&&
5
==
gb
&&
5
==
bb
)
return
TRUE
;
break
;
...
...
@@ -1039,6 +1042,9 @@ static BOOL IWineD3DImpl_IsGLXFBConfigCompatibleWithDepthFmt(WineD3D_Context* ct
case
WINED3DFMT_D24S8
:
if
(
24
==
db
&&
8
==
sb
)
return
TRUE
;
break
;
case
WINED3DFMT_D24FS8
:
if
(
24
==
db
&&
8
==
sb
)
return
TRUE
;
break
;
case
WINED3DFMT_D24X8
:
if
(
24
==
db
)
return
TRUE
;
break
;
...
...
dlls/wined3d/surface.c
View file @
13fc2f88
...
...
@@ -724,6 +724,17 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
vcheckGLcall
(
"glPixelStorei"
);
}
break
;
case
WINED3DFMT_A2R10G10B10
:
{
glPixelStorei
(
GL_PACK_SWAP_BYTES
,
TRUE
);
vcheckGLcall
(
"glPixelStorei"
);
glDrawPixels
(
This
->
lockedRect
.
right
-
This
->
lockedRect
.
left
,
(
This
->
lockedRect
.
bottom
-
This
->
lockedRect
.
top
)
-
1
,
GL_BGRA
,
GL_UNSIGNED_INT_2_10_10_10_REV
,
This
->
resource
.
allocatedMemory
);
vcheckGLcall
(
"glDrawPixels"
);
glPixelStorei
(
GL_PACK_SWAP_BYTES
,
prev_store
);
vcheckGLcall
(
"glPixelStorei"
);
}
break
;
default:
FIXME
(
"Unsupported Format %u in locking func
\n
"
,
This
->
resource
.
format
);
}
...
...
dlls/wined3d/utils.c
View file @
13fc2f88
...
...
@@ -73,6 +73,7 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
FMT_TO_STR
(
WINED3DFMT_D32
);
FMT_TO_STR
(
WINED3DFMT_D15S1
);
FMT_TO_STR
(
WINED3DFMT_D24S8
);
FMT_TO_STR
(
WINED3DFMT_D24FS8
);
FMT_TO_STR
(
WINED3DFMT_D24X8
);
FMT_TO_STR
(
WINED3DFMT_D24X4S4
);
FMT_TO_STR
(
WINED3DFMT_D16
);
...
...
@@ -1610,12 +1611,14 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case
WINED3DFMT_A4R4G4B4
:
retVal
=
GL_RGBA4
;
break
;
case
WINED3DFMT_X4R4G4B4
:
retVal
=
GL_RGB4
;
break
;
case
WINED3DFMT_A8R8G8B8
:
retVal
=
GL_RGBA8
;
break
;
case
WINED3DFMT_A2R10G10B10
:
retVal
=
GL_RGBA8
;
break
;
case
WINED3DFMT_X8R8G8B8
:
retVal
=
GL_RGB
;
break
;
/* to see */
case
WINED3DFMT_A8
:
retVal
=
GL_ALPHA8
;
break
;
/* Depth + Stencil NOTE: OpenGL doesn't support depth-stencil surfaces so the formats are the closes bits match for the data */
case
WINED3DFMT_D24S8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24FS8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24X8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24X4S4
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D32
:
retVal
=
GL_COLOR_INDEX
;
break
;
...
...
@@ -1673,11 +1676,13 @@ GLenum D3DFmt2GLFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case
WINED3DFMT_A4R4G4B4
:
retVal
=
GL_BGRA
;
break
;
case
WINED3DFMT_X4R4G4B4
:
retVal
=
GL_BGRA
;
break
;
case
WINED3DFMT_A8R8G8B8
:
retVal
=
GL_BGRA
;
break
;
case
WINED3DFMT_A2R10G10B10
:
retVal
=
GL_BGRA
;
break
;
case
WINED3DFMT_X8R8G8B8
:
retVal
=
GL_BGRA
;
break
;
/* to see */
case
WINED3DFMT_A8
:
retVal
=
GL_ALPHA
;
break
;
/* Depth + Stencil */
case
WINED3DFMT_D24S8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24FS8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24X8
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D24X4S4
:
retVal
=
GL_COLOR_INDEX
;
break
;
case
WINED3DFMT_D32
:
retVal
=
GL_COLOR_INDEX
;
break
;
...
...
@@ -1733,11 +1738,13 @@ GLenum D3DFmt2GLType(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case
WINED3DFMT_A4R4G4B4
:
retVal
=
GL_UNSIGNED_SHORT_4_4_4_4_REV
;
break
;
case
WINED3DFMT_X4R4G4B4
:
retVal
=
GL_UNSIGNED_SHORT_4_4_4_4_REV
;
break
;
case
WINED3DFMT_A8R8G8B8
:
retVal
=
GL_UNSIGNED_INT_8_8_8_8_REV
;
break
;
case
WINED3DFMT_A2R10G10B10
:
retVal
=
GL_UNSIGNED_INT_2_10_10_10_REV
;
break
;
case
WINED3DFMT_X8R8G8B8
:
retVal
=
GL_UNSIGNED_INT_8_8_8_8_REV
;
break
;
/* to see */
case
WINED3DFMT_A8
:
retVal
=
GL_ALPHA
;
break
;
/* Depth + Stencil */
case
WINED3DFMT_D24S8
:
retVal
=
GL_UNSIGNED_INT
;
break
;
case
WINED3DFMT_D24FS8
:
retVal
=
GL_UNSIGNED_INT
;
break
;
case
WINED3DFMT_D24X8
:
retVal
=
GL_UNSIGNED_INT
;
break
;
case
WINED3DFMT_D24X4S4
:
retVal
=
GL_UNSIGNED_INT
;
break
;
case
WINED3DFMT_D32
:
retVal
=
GL_UNSIGNED_INT
;
break
;
...
...
@@ -1774,6 +1781,7 @@ SHORT D3DFmtGetBpp(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case
WINED3DFMT_A4R4G4B4
:
retVal
=
2
;
break
;
case
WINED3DFMT_X4R4G4B4
:
retVal
=
2
;
break
;
case
WINED3DFMT_A8R8G8B8
:
retVal
=
4
;
break
;
case
WINED3DFMT_A2R10G10B10
:
retVal
=
4
;
break
;
case
WINED3DFMT_X8R8G8B8
:
retVal
=
4
;
break
;
/* Paletted */
case
WINED3DFMT_P8
:
retVal
=
1
;
break
;
...
...
@@ -1785,6 +1793,7 @@ SHORT D3DFmtGetBpp(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case
WINED3DFMT_D15S1
:
retVal
=
2
;
break
;
case
WINED3DFMT_D24X4S4
:
retVal
=
4
;
break
;
case
WINED3DFMT_D24S8
:
retVal
=
4
;
break
;
case
WINED3DFMT_D24FS8
:
retVal
=
4
;
break
;
case
WINED3DFMT_D24X8
:
retVal
=
4
;
break
;
/* Luminance */
case
WINED3DFMT_L8
:
retVal
=
1
;
break
;
...
...
@@ -1874,6 +1883,13 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
PUSH2
(
GLX_BLUE_SIZE
,
8
);
break
;
case
WINED3DFMT_A2R10G10B10
:
PUSH2
(
GLX_ALPHA_SIZE
,
2
);
PUSH2
(
GLX_RED_SIZE
,
10
);
PUSH2
(
GLX_GREEN_SIZE
,
10
);
PUSH2
(
GLX_BLUE_SIZE
,
10
);
break
;
default
:
break
;
}
...
...
@@ -1905,6 +1921,11 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
PUSH2
(
GLX_STENCIL_SIZE
,
8
);
break
;
case
WINED3DFMT_D24FS8
:
PUSH2
(
GLX_DEPTH_SIZE
,
24
);
PUSH2
(
GLX_STENCIL_SIZE
,
8
);
break
;
case
WINED3DFMT_D32
:
PUSH2
(
GLX_DEPTH_SIZE
,
32
);
break
;
...
...
@@ -1941,6 +1962,11 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
PUSH2
(
GLX_STENCIL_SIZE
,
1
);
break
;
case
WINED3DFMT_D24FS8
:
PUSH2
(
GLX_DEPTH_SIZE
,
1
);
PUSH2
(
GLX_STENCIL_SIZE
,
1
);
break
;
case
WINED3DFMT_D32
:
PUSH2
(
GLX_DEPTH_SIZE
,
1
);
break
;
...
...
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