mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
vulkan/runtime: call CmdSetDepthBias2EXT() from CmdSetDepthBias()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23696>
This commit is contained in:
parent
ae7d904a73
commit
0432a748ee
1 changed files with 8 additions and 18 deletions
|
|
@ -2210,26 +2210,16 @@ vk_common_CmdSetDepthBias(VkCommandBuffer commandBuffer,
|
|||
float depthBiasSlopeFactor)
|
||||
{
|
||||
VK_FROM_HANDLE(vk_command_buffer, cmd, commandBuffer);
|
||||
struct vk_dynamic_graphics_state *dyn = &cmd->dynamic_graphics_state;
|
||||
|
||||
SET_DYN_VALUE(dyn, RS_DEPTH_BIAS_FACTORS,
|
||||
rs.depth_bias.constant, depthBiasConstantFactor);
|
||||
SET_DYN_VALUE(dyn, RS_DEPTH_BIAS_FACTORS,
|
||||
rs.depth_bias.clamp, depthBiasClamp);
|
||||
SET_DYN_VALUE(dyn, RS_DEPTH_BIAS_FACTORS,
|
||||
rs.depth_bias.slope, depthBiasSlopeFactor);
|
||||
VkDepthBiasInfoEXT depth_bias_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_DEPTH_BIAS_INFO_EXT,
|
||||
.depthBiasConstantFactor = depthBiasConstantFactor,
|
||||
.depthBiasClamp = depthBiasClamp,
|
||||
.depthBiasSlopeFactor = depthBiasSlopeFactor,
|
||||
};
|
||||
|
||||
/** From the Vulkan 1.3.254 spec:
|
||||
*
|
||||
* "Calling this function is equivalent to calling vkCmdSetDepthBias2EXT
|
||||
* without a VkDepthBiasRepresentationInfoEXT in the pNext chain of
|
||||
* VkDepthBiasInfoEXT."
|
||||
*/
|
||||
SET_DYN_VALUE(dyn, RS_DEPTH_BIAS_FACTORS,
|
||||
rs.depth_bias.representation,
|
||||
VK_DEPTH_BIAS_REPRESENTATION_LEAST_REPRESENTABLE_VALUE_FORMAT_EXT);
|
||||
SET_DYN_VALUE(dyn, RS_DEPTH_BIAS_FACTORS,
|
||||
rs.depth_bias.exact, false);
|
||||
cmd->base.device->dispatch_table.CmdSetDepthBias2EXT(commandBuffer,
|
||||
&depth_bias_info);
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue