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
dc135648
Commit
dc135648
authored
Sep 16, 2010
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Sep 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add NVDB support.
parent
8fdfc736
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
0 deletions
+69
-0
directx.c
dlls/wined3d/directx.c
+16
-0
state.c
dlls/wined3d/state.c
+37
-0
utils.c
dlls/wined3d/utils.c
+3
-0
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+12
-0
wined3d.idl
include/wine/wined3d.idl
+1
-0
No files found.
dlls/wined3d/directx.c
View file @
dc135648
...
@@ -105,6 +105,7 @@ static const struct {
...
@@ -105,6 +105,7 @@ static const struct {
{
"GL_EXT_blend_equation_separate"
,
EXT_BLEND_EQUATION_SEPARATE
,
0
},
{
"GL_EXT_blend_equation_separate"
,
EXT_BLEND_EQUATION_SEPARATE
,
0
},
{
"GL_EXT_blend_func_separate"
,
EXT_BLEND_FUNC_SEPARATE
,
0
},
{
"GL_EXT_blend_func_separate"
,
EXT_BLEND_FUNC_SEPARATE
,
0
},
{
"GL_EXT_blend_minmax"
,
EXT_BLEND_MINMAX
,
0
},
{
"GL_EXT_blend_minmax"
,
EXT_BLEND_MINMAX
,
0
},
{
"GL_EXT_depth_bounds_test"
,
EXT_DEPTH_BOUNDS_TEST
,
0
},
{
"GL_EXT_draw_buffers2"
,
EXT_DRAW_BUFFERS2
,
0
},
{
"GL_EXT_draw_buffers2"
,
EXT_DRAW_BUFFERS2
,
0
},
{
"GL_EXT_fog_coord"
,
EXT_FOG_COORD
,
0
},
{
"GL_EXT_fog_coord"
,
EXT_FOG_COORD
,
0
},
{
"GL_EXT_framebuffer_blit"
,
EXT_FRAMEBUFFER_BLIT
,
0
},
{
"GL_EXT_framebuffer_blit"
,
EXT_FRAMEBUFFER_BLIT
,
0
},
...
@@ -3611,6 +3612,21 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct
...
@@ -3611,6 +3612,21 @@ static BOOL CheckTextureCapability(struct wined3d_adapter *adapter, const struct
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
return
FALSE
;
/* Depth bound test. To query if the card supports it CheckDeviceFormat with the special
* format MAKEFOURCC('N','V','D','B') is used.
* It is enabled by setting D3DRS_ADAPTIVETESS_X render state to MAKEFOURCC('N','V','D','B') and
* then controlled by setting D3DRS_ADAPTIVETESS_Z (zMin) and D3DRS_ADAPTIVETESS_W (zMax)
* to test value.
*/
case
WINED3DFMT_NVDB
:
if
(
gl_info
->
supported
[
EXT_DEPTH_BOUNDS_TEST
])
{
TRACE_
(
d3d_caps
)(
"[OK]
\n
"
);
return
TRUE
;
}
TRACE_
(
d3d_caps
)(
"[FAILED]
\n
"
);
return
FALSE
;
case
WINED3DFMT_NVHU
:
case
WINED3DFMT_NVHU
:
case
WINED3DFMT_NVHS
:
case
WINED3DFMT_NVHS
:
/* These formats seem to be similar to the HILO formats in GL_NV_texture_shader. NVHU
/* These formats seem to be similar to the HILO formats in GL_NV_texture_shader. NVHU
...
...
dlls/wined3d/state.c
View file @
dc135648
...
@@ -1880,6 +1880,42 @@ static void state_tessellation(DWORD state, IWineD3DStateBlockImpl *stateblock,
...
@@ -1880,6 +1880,42 @@ static void state_tessellation(DWORD state, IWineD3DStateBlockImpl *stateblock,
stateblock
->
state
.
render_states
[
WINED3DRS_ENABLEADAPTIVETESSELLATION
]);
stateblock
->
state
.
render_states
[
WINED3DRS_ENABLEADAPTIVETESSELLATION
]);
}
}
static
void
state_nvdb
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
union
{
DWORD
d
;
float
f
;
}
zmin
,
zmax
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_ADAPTIVETESS_X
]
==
WINED3DFMT_NVDB
)
{
zmin
.
d
=
stateblock
->
state
.
render_states
[
WINED3DRS_ADAPTIVETESS_Z
];
zmax
.
d
=
stateblock
->
state
.
render_states
[
WINED3DRS_ADAPTIVETESS_W
];
/* If zmin is larger than zmax INVALID_VALUE error is generated.
* In d3d9 test is not performed in this case*/
if
(
zmin
.
f
<=
zmax
.
f
)
{
glEnable
(
GL_DEPTH_BOUNDS_TEST_EXT
);
checkGLcall
(
"glEnable(GL_DEPTH_BOUNDS_TEST_EXT)"
);
GL_EXTCALL
(
glDepthBoundsEXT
(
zmin
.
f
,
zmax
.
f
));
checkGLcall
(
"glDepthBoundsEXT(...)"
);
}
else
{
glDisable
(
GL_DEPTH_BOUNDS_TEST_EXT
);
checkGLcall
(
"glDisable(GL_DEPTH_BOUNDS_TEST_EXT)"
);
}
}
else
{
glDisable
(
GL_DEPTH_BOUNDS_TEST_EXT
);
checkGLcall
(
"glDisable(GL_DEPTH_BOUNDS_TEST_EXT)"
);
}
state_tessellation
(
state
,
stateblock
,
context
);
}
static
void
state_wrapu
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
static
void
state_wrapu
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
{
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_WRAPU
])
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_WRAPU
])
...
@@ -5078,6 +5114,7 @@ const struct StateEntryTemplate misc_state_template[] = {
...
@@ -5078,6 +5114,7 @@ const struct StateEntryTemplate misc_state_template[] = {
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_Y
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_Y
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_Z
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_Z
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_W
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ADAPTIVETESS_W
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
state_nvdb
},
EXT_DEPTH_BOUNDS_TEST
},
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
state_tessellation
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
{
STATE_RENDER
(
WINED3DRS_ENABLEADAPTIVETESSELLATION
),
state_tessellation
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
state_msaa
},
ARB_MULTISAMPLE
},
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
state_msaa
},
ARB_MULTISAMPLE
},
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
state_msaa_w
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
{
STATE_RENDER
(
WINED3DRS_MULTISAMPLEANTIALIAS
),
state_msaa_w
},
WINED3D_GL_EXT_NONE
},
...
...
dlls/wined3d/utils.c
View file @
dc135648
...
@@ -129,6 +129,7 @@ static const struct StaticPixelFormatDesc formats[] =
...
@@ -129,6 +129,7 @@ static const struct StaticPixelFormatDesc formats[] =
{
WINED3DFMT_R16G16B16A16_SNORM
,
0x0
,
0x0
,
0x0
,
0x0
,
8
,
0
,
0
},
{
WINED3DFMT_R16G16B16A16_SNORM
,
0x0
,
0x0
,
0x0
,
0x0
,
8
,
0
,
0
},
/* Vendor-specific formats */
/* Vendor-specific formats */
{
WINED3DFMT_ATI2N
,
0x0
,
0x0
,
0x0
,
0x0
,
1
,
0
,
0
},
{
WINED3DFMT_ATI2N
,
0x0
,
0x0
,
0x0
,
0x0
,
1
,
0
,
0
},
{
WINED3DFMT_NVDB
,
0x0
,
0x0
,
0x0
,
0x0
,
0
,
0
,
0
},
{
WINED3DFMT_NVHU
,
0x0
,
0x0
,
0x0
,
0x0
,
2
,
0
,
0
},
{
WINED3DFMT_NVHU
,
0x0
,
0x0
,
0x0
,
0x0
,
2
,
0
,
0
},
{
WINED3DFMT_NVHS
,
0x0
,
0x0
,
0x0
,
0x0
,
2
,
0
,
0
},
{
WINED3DFMT_NVHS
,
0x0
,
0x0
,
0x0
,
0x0
,
2
,
0
,
0
},
};
};
...
@@ -167,6 +168,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
...
@@ -167,6 +168,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
{
WINED3DFMT_R8G8B8A8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_R8G8B8A8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_R8G8B8X8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_R8G8B8X8_UNORM
,
WINED3DFMT_FLAG_GETDC
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_FOURCC
|
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_ATI2N
,
WINED3DFMT_FLAG_FOURCC
|
WINED3DFMT_FLAG_BROKEN_PITCH
},
{
WINED3DFMT_NVDB
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_NVHU
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_NVHU
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_NVHS
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_NVHS
,
WINED3DFMT_FLAG_FOURCC
},
{
WINED3DFMT_R32_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
{
WINED3DFMT_R32_FLOAT
,
WINED3DFMT_FLAG_FLOAT
},
...
@@ -1626,6 +1628,7 @@ const char *debug_d3dformat(enum wined3d_format_id format_id)
...
@@ -1626,6 +1628,7 @@ const char *debug_d3dformat(enum wined3d_format_id format_id)
FMT_TO_STR
(
WINED3DFMT_VERTEXDATA
);
FMT_TO_STR
(
WINED3DFMT_VERTEXDATA
);
FMT_TO_STR
(
WINED3DFMT_R8G8_SNORM_Cx
);
FMT_TO_STR
(
WINED3DFMT_R8G8_SNORM_Cx
);
FMT_TO_STR
(
WINED3DFMT_ATI2N
);
FMT_TO_STR
(
WINED3DFMT_ATI2N
);
FMT_TO_STR
(
WINED3DFMT_NVDB
);
FMT_TO_STR
(
WINED3DFMT_NVHU
);
FMT_TO_STR
(
WINED3DFMT_NVHU
);
FMT_TO_STR
(
WINED3DFMT_NVHS
);
FMT_TO_STR
(
WINED3DFMT_NVHS
);
FMT_TO_STR
(
WINED3DFMT_R32G32B32A32_TYPELESS
);
FMT_TO_STR
(
WINED3DFMT_R32G32B32A32_TYPELESS
);
...
...
dlls/wined3d/wined3d_gl.h
View file @
dc135648
...
@@ -1787,6 +1787,7 @@ typedef enum wined3d_gl_extension
...
@@ -1787,6 +1787,7 @@ typedef enum wined3d_gl_extension
EXT_BLEND_FUNC_SEPARATE
,
EXT_BLEND_FUNC_SEPARATE
,
EXT_BLEND_MINMAX
,
EXT_BLEND_MINMAX
,
EXT_DRAW_BUFFERS2
,
EXT_DRAW_BUFFERS2
,
EXT_DEPTH_BOUNDS_TEST
,
EXT_FOG_COORD
,
EXT_FOG_COORD
,
EXT_FRAMEBUFFER_BLIT
,
EXT_FRAMEBUFFER_BLIT
,
EXT_FRAMEBUFFER_MULTISAMPLE
,
EXT_FRAMEBUFFER_MULTISAMPLE
,
...
@@ -2982,6 +2983,14 @@ typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLe
...
@@ -2982,6 +2983,14 @@ typedef void (WINE_GLAPI *PGLFNBLENDEQUATIONSEPARATEEXTPROC)(GLenum modeRGB, GLe
typedef
void
(
WINE_GLAPI
*
PGLFNBLENDFUNCSEPARATEEXTPROC
)(
GLenum
sfactorRGB
,
GLenum
dfactorRGB
,
typedef
void
(
WINE_GLAPI
*
PGLFNBLENDFUNCSEPARATEEXTPROC
)(
GLenum
sfactorRGB
,
GLenum
dfactorRGB
,
GLenum
sfactorAlpha
,
GLenum
dfactorAlpha
);
GLenum
sfactorAlpha
,
GLenum
dfactorAlpha
);
/* GL_EXT_depth_bounds_test */
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
#define GL_DEPTH_BOUNDS_EXT 0x8891
#endif
typedef
void
(
WINE_GLAPI
*
PGLFNDEPTHBOUNDSEXTPROC
)(
GLclampd
zmin
,
GLclampd
zmax
);
/* GL_EXT_draw_buffers2 */
/* GL_EXT_draw_buffers2 */
typedef
GLvoid
(
WINE_GLAPI
*
PGLFNCOLORMASKINDEXEDEXTPROC
)(
GLuint
buffer_idx
,
GLboolean
r
,
GLboolean
g
,
typedef
GLvoid
(
WINE_GLAPI
*
PGLFNCOLORMASKINDEXEDEXTPROC
)(
GLuint
buffer_idx
,
GLboolean
r
,
GLboolean
g
,
GLboolean
b
,
GLboolean
a
);
GLboolean
b
,
GLboolean
a
);
...
@@ -4221,6 +4230,9 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma
...
@@ -4221,6 +4230,9 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma
/* GL_EXT_blend_func_separate */
\
/* GL_EXT_blend_func_separate */
\
USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEEXTPROC, \
USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEEXTPROC, \
glBlendEquationSeparateEXT, EXT_BLEND_EQUATION_SEPARATE, NULL) \
glBlendEquationSeparateEXT, EXT_BLEND_EQUATION_SEPARATE, NULL) \
/* GL_EXT_depth_bounds_test */
\
USE_GL_FUNC(PGLFNDEPTHBOUNDSEXTPROC, \
glDepthBoundsEXT, EXT_DEPTH_BOUNDS_TEST, NULL) \
/* GL_EXT_draw_buffers2 */
\
/* GL_EXT_draw_buffers2 */
\
USE_GL_FUNC(PGLFNCOLORMASKINDEXEDEXTPROC, \
USE_GL_FUNC(PGLFNCOLORMASKINDEXEDEXTPROC, \
glColorMaskIndexedEXT, EXT_DRAW_BUFFERS2, NULL) \
glColorMaskIndexedEXT, EXT_DRAW_BUFFERS2, NULL) \
...
...
include/wine/wined3d.idl
View file @
dc135648
...
@@ -271,6 +271,7 @@ enum wined3d_format_id
...
@@ -271,6 +271,7 @@ enum wined3d_format_id
WINED3DFMT_R8G8_B8G8
=
WINEMAKEFOURCC
(
'R'
,
'G'
,
'B'
,
'G'
),
WINED3DFMT_R8G8_B8G8
=
WINEMAKEFOURCC
(
'R'
,
'G'
,
'B'
,
'G'
),
WINED3DFMT_ATI2N
=
WINEMAKEFOURCC
(
'A'
,
'T'
,
'I'
,
'2'
),
WINED3DFMT_ATI2N
=
WINEMAKEFOURCC
(
'A'
,
'T'
,
'I'
,
'2'
),
WINED3DFMT_INST
=
WINEMAKEFOURCC
(
'I'
,
'N'
,
'S'
,
'T'
),
WINED3DFMT_INST
=
WINEMAKEFOURCC
(
'I'
,
'N'
,
'S'
,
'T'
),
WINED3DFMT_NVDB
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'D'
,
'B'
),
WINED3DFMT_NVHU
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'H'
,
'U'
),
WINED3DFMT_NVHU
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'H'
,
'U'
),
WINED3DFMT_NVHS
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'H'
,
'S'
),
WINED3DFMT_NVHS
=
WINEMAKEFOURCC
(
'N'
,
'V'
,
'H'
,
'S'
),
...
...
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