mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
fix conservative rasterization for vulkan
This commit is contained in:
@@ -1192,6 +1192,13 @@ impl crate::Device<super::Api> for super::Device {
|
||||
if let Some(face) = desc.primitive.cull_mode {
|
||||
vk_rasterization = vk_rasterization.cull_mode(conv::map_cull_face(face))
|
||||
}
|
||||
let mut vk_rasterization_conservative_state =
|
||||
vk::PipelineRasterizationConservativeStateCreateInfoEXT::builder()
|
||||
.conservative_rasterization_mode(vk::ConservativeRasterizationModeEXT::OVERESTIMATE)
|
||||
.build();
|
||||
if desc.primitive.conservative {
|
||||
vk_rasterization = vk_rasterization.push_next(&mut vk_rasterization_conservative_state);
|
||||
}
|
||||
|
||||
let mut vk_depth_stencil = vk::PipelineDepthStencilStateCreateInfo::builder();
|
||||
if let Some(ref ds) = desc.depth_stencil {
|
||||
|
||||
@@ -448,7 +448,6 @@ bitflags::bitflags! {
|
||||
/// Only triangles are supported.
|
||||
///
|
||||
/// Supported platforms:
|
||||
/// - DX12
|
||||
/// - Vulkan
|
||||
///
|
||||
/// This is a native only feature.
|
||||
|
||||
@@ -320,7 +320,7 @@ fn conservative_raster() {
|
||||
width: 1024,
|
||||
height: 768,
|
||||
optional_features: wgpu::Features::default(),
|
||||
base_test_parameters: framework::test_common::TestParameters::default().failure(),
|
||||
base_test_parameters: framework::test_common::TestParameters::default(),
|
||||
tollerance: 0,
|
||||
max_outliers: 0,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user