mirror of
https://github.com/italicsjenga/portability.git
synced 2025-02-23 17:47:43 +11:00
Implement depth bias
This commit is contained in:
parent
65126188f5
commit
acfbf29a4d
1 changed files with 9 additions and 2 deletions
|
@ -1490,14 +1490,21 @@ pub extern "C" fn gfxCreateGraphicsPipelines(
|
|||
let state = unsafe { &*info.pRasterizationState };
|
||||
|
||||
assert_eq!(state.rasterizerDiscardEnable, VK_FALSE); // TODO
|
||||
assert_eq!(state.depthBiasEnable, VK_FALSE); // TODO: ready for work
|
||||
|
||||
pso::Rasterizer {
|
||||
polygon_mode: conv::map_polygon_mode(state.polygonMode, state.lineWidth),
|
||||
cull_face: conv::map_cull_face(state.cullMode),
|
||||
front_face: conv::map_front_face(state.frontFace),
|
||||
depth_clamping: state.depthClampEnable == VK_TRUE,
|
||||
depth_bias: None, // TODO
|
||||
depth_bias: if state.depthBiasEnable == VK_TRUE {
|
||||
Some(pso::DepthBias {
|
||||
const_factor: state.depthBiasConstantFactor,
|
||||
clamp: state.depthBiasClamp,
|
||||
slope_factor: state.depthBiasSlopeFactor,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
conservative: false,
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue