Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yusuf Khan
mesa
Commits
db34e72b
Commit
db34e72b
authored
Nov 06, 2022
by
Yusuf Khan
Browse files
nvk: Support depth clip
Signed-off-by:
Yusuf Khan
<
yusisamerican@gmail.com
>
parent
b257bb39
Pipeline
#730766
waiting for manual action with stages
in 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/nouveau/vulkan/nvk_graphics_pipeline.c
View file @
db34e72b
...
...
@@ -31,11 +31,12 @@ static void
emit_pipeline_rs_state
(
struct
nv_push
*
p
,
const
struct
vk_rasterization_state
*
rs
)
{
/* TODO: Depth clip? */
unsigned
clip_clamp_enable
=
rs
->
depth_clamp_enable
|
rs
->
depth_clip_enable
;
P_IMMD
(
p
,
NV9097
,
SET_VIEWPORT_CLIP_CONTROL
,
{
.
min_z_zero_max_z_one
=
MIN_Z_ZERO_MAX_Z_ONE_TRUE
,
.
pixel_min_z
=
rs
->
depth
_clamp_enable
?
PIXEL_MIN_Z_CLAMP
:
PIXEL_MIN_Z_CLIP
,
.
pixel_max_z
=
rs
->
depth
_clamp_enable
?
PIXEL_MAX_Z_CLAMP
:
PIXEL_MAX_Z_CLIP
,
.
pixel_min_z
=
clip
_clamp_enable
?
PIXEL_MIN_Z_CLAMP
:
PIXEL_MIN_Z_CLIP
,
.
pixel_max_z
=
clip
_clamp_enable
?
PIXEL_MAX_Z_CLAMP
:
PIXEL_MAX_Z_CLIP
,
.
geometry_guardband
=
GEOMETRY_GUARDBAND_SCALE_256
,
.
line_point_cull_guardband
=
LINE_POINT_CULL_GUARDBAND_SCALE_256
,
.
geometry_clip
=
GEOMETRY_CLIP_WZERO_CLIP
,
...
...
src/nouveau/vulkan/nvk_physical_device.c
View file @
db34e72b
...
...
@@ -178,6 +178,11 @@ nvk_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
f
->
vertexInputDynamicState
=
true
;
break
;
}
case
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_ENABLE_FEATURES_EXT
:
{
VkPhysicalDeviceDepthClipEnableFeaturesEXT
*
f
=
(
void
*
)
ext
;
f
->
depthClipEnable
=
true
;
break
;
}
/* More feature structs */
default:
break
;
...
...
@@ -403,6 +408,7 @@ nvk_get_device_extensions(const struct nvk_physical_device *pdev,
.
EXT_private_data
=
true
,
.
EXT_sample_locations
=
pdev
->
info
.
cls_eng3d
>=
MAXWELL_B
,
.
EXT_vertex_input_dynamic_state
=
true
,
.
EXT_depth_clip_enable
=
true
,
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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