Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
4d37754a
Commit
4d37754a
authored
May 22, 2021
by
Zebediah Figura
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvapi: Implement NvAPI_D3D11_SetDepthBoundsTest().
parent
d89547e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
1 deletion
+50
-1
nvapi.c
dlls/nvapi/nvapi.c
+29
-0
nvapi.c
dlls/nvapi/tests/nvapi.c
+17
-0
device.c
dlls/wined3d/device.c
+1
-1
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d.h
include/wine/wined3d.h
+2
-0
No files found.
dlls/nvapi/nvapi.c
View file @
4d37754a
...
...
@@ -27,8 +27,10 @@
#include "wine/list.h"
#include "nvapi.h"
#include "d3d9.h"
#include "initguid.h"
#include "wine/wined3d.h"
#include "wine/winedxgi.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
nvapi
);
...
...
@@ -680,6 +682,32 @@ static NvAPI_Status CDECL NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysica
return
NVAPI_OK
;
}
static
NvAPI_Status
CDECL
NvAPI_D3D11_SetDepthBoundsTest
(
IUnknown
*
unk
,
NvU32
enable
,
float
min
,
float
max
)
{
struct
wined3d_device_context
*
wined3d_context
;
IWineD3DDeviceContext
*
context
;
HRESULT
hr
;
TRACE
(
"unk %p, enable %u, min %.8e, max %.8e.
\n
"
,
unk
,
enable
,
min
,
max
);
if
(
!
unk
)
return
NVAPI_INVALID_ARGUMENT
;
if
(
FAILED
(
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IWineD3DDeviceContext
,
(
void
**
)
&
context
)))
{
ERR
(
"Failed to retrieve IWineD3DDeviceContext interface, hr %#x.
\n
"
,
hr
);
return
NVAPI_ERROR
;
}
wined3d_context
=
IWineD3DDeviceContext_get_wined3d_device_context
(
context
);
wined3d_mutex_lock
();
wined3d_device_context_set_depth_bounds
(
wined3d_context
,
enable
,
min
,
max
);
wined3d_mutex_unlock
();
IWineD3DDeviceContext_Release
(
context
);
return
NVAPI_OK
;
}
void
*
CDECL
nvapi_QueryInterface
(
unsigned
int
offset
)
{
static
const
struct
...
...
@@ -725,6 +753,7 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
{
0x46fbeb03
,
NvAPI_GPU_GetPhysicalFrameBufferSize
},
{
0x5a04b644
,
NvAPI_GPU_GetVirtualFrameBufferSize
},
{
0xc7026a87
,
NvAPI_GPU_GetGpuCoreCount
},
{
0x7aaf7a04
,
NvAPI_D3D11_SetDepthBoundsTest
},
};
unsigned
int
i
;
TRACE
(
"(%x)
\n
"
,
offset
);
...
...
dlls/nvapi/tests/nvapi.c
View file @
4d37754a
...
...
@@ -45,6 +45,7 @@ static NvAPI_Status (CDECL* pNvAPI_EnumNvidiaDisplayHandle)(NvU32 thisEnum, NvDi
static
NvAPI_Status
(
CDECL
*
pNvAPI_SYS_GetDriverAndBranchVersion
)(
NvU32
*
pDriverVersion
,
NvAPI_ShortString
szBuildBranchString
);
static
NvAPI_Status
(
CDECL
*
pNvAPI_D3D_GetCurrentSLIState
)(
IUnknown
*
pDevice
,
NV_GET_CURRENT_SLI_STATE
*
pSliState
);
static
NvAPI_Status
(
CDECL
*
pNvAPI_GetLogicalGPUFromDisplay
)(
NvDisplayHandle
hNvDisp
,
NvLogicalGpuHandle
*
pLogicalGPU
);
static
NvAPI_Status
(
CDECL
*
pNvAPI_D3D11_SetDepthBoundsTest
)(
IUnknown
*
unk
,
NvU32
enable
,
float
min
,
float
max
);
static
const
struct
{
...
...
@@ -68,6 +69,7 @@ function_list[] =
{
0x2926aaad
,
(
void
**
)
&
pNvAPI_SYS_GetDriverAndBranchVersion
},
{
0x4b708b54
,
(
void
**
)
&
pNvAPI_D3D_GetCurrentSLIState
},
{
0xee1370cf
,
(
void
**
)
&
pNvAPI_GetLogicalGPUFromDisplay
},
{
0x7aaf7a04
,
(
void
**
)
&
pNvAPI_D3D11_SetDepthBoundsTest
},
};
static
BOOL
init
(
void
)
...
...
@@ -705,6 +707,20 @@ cleanup:
if
(
window
)
DestroyWindow
(
window
);
}
static
void
test_NvAPI_D3D11_SetDepthBoundsTest
(
void
)
{
NvAPI_Status
status
;
if
(
!
pNvAPI_D3D11_SetDepthBoundsTest
)
{
win_skip
(
"NvAPI_D3D11_SetDepthBoundsTest export not found.
\n
"
);
return
;
}
status
=
pNvAPI_D3D11_SetDepthBoundsTest
(
NULL
,
0
,
0
.
0
,
0
.
0
);
ok
(
status
==
NVAPI_INVALID_ARGUMENT
,
"Expected status NVAPI_INVALID_ARGUMENT, got %d
\n
"
,
status
);
}
START_TEST
(
nvapi
)
{
WNDCLASSA
wc
=
{
0
};
...
...
@@ -724,6 +740,7 @@ START_TEST( nvapi )
test_NvAPI_EnumNvidiaDisplayHandle
();
test_NvAPI_SYS_GetDriverAndBranchVersion
();
test_NvAPI_GetLogicalGPUFromDisplay
();
test_NvAPI_D3D11_SetDepthBoundsTest
();
/* d3d9 tests */
wc
.
lpfnWndProc
=
DefWindowProcA
;
...
...
dlls/wined3d/device.c
View file @
4d37754a
...
...
@@ -2162,7 +2162,7 @@ out:
wined3d_device_context_unlock
(
context
);
}
static
void
wined3d_device_context_set_depth_bounds
(
struct
wined3d_device_context
*
context
,
void
CDECL
wined3d_device_context_set_depth_bounds
(
struct
wined3d_device_context
*
context
,
BOOL
enable
,
float
min
,
float
max
)
{
TRACE
(
"context %p, enable %d, min %.8e, max %.8e.
\n
"
,
context
,
enable
,
min
,
max
);
...
...
dlls/wined3d/wined3d.spec
View file @
4d37754a
...
...
@@ -127,6 +127,7 @@
@ cdecl wined3d_device_context_resolve_sub_resource(ptr ptr long ptr long long)
@ cdecl wined3d_device_context_set_blend_state(ptr ptr ptr long)
@ cdecl wined3d_device_context_set_constant_buffers(ptr long long long ptr)
@ cdecl wined3d_device_context_set_depth_bounds(ptr long float float)
@ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long)
@ cdecl wined3d_device_context_set_depth_stencil_view(ptr ptr)
@ cdecl wined3d_device_context_set_index_buffer(ptr ptr long long)
...
...
include/wine/wined3d.h
View file @
4d37754a
...
...
@@ -2541,6 +2541,8 @@ void __cdecl wined3d_device_context_set_blend_state(struct wined3d_device_contex
void
__cdecl
wined3d_device_context_set_constant_buffers
(
struct
wined3d_device_context
*
context
,
enum
wined3d_shader_type
type
,
unsigned
int
start_idx
,
unsigned
int
count
,
const
struct
wined3d_constant_buffer_state
*
buffers
);
void
__cdecl
wined3d_device_context_set_depth_bounds
(
struct
wined3d_device_context
*
context
,
BOOL
enable
,
float
min
,
float
max
);
void
__cdecl
wined3d_device_context_set_depth_stencil_state
(
struct
wined3d_device_context
*
context
,
struct
wined3d_depth_stencil_state
*
depth_stencil_state
,
unsigned
int
stencil_ref
);
HRESULT
__cdecl
wined3d_device_context_set_depth_stencil_view
(
struct
wined3d_device_context
*
context
,
...
...
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