Commit a19cdf98 authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Marge Bot
Browse files

anv: only use VkSamplerCreateInfo::compareOp if enabled

The spec says nothing about the validity of the compareOp field when
compareEnable is false.

v2: use vulkan enum to pick default value (Caio)
Signed-off-by: Lionel Landwerlin's avatarLionel Landwerlin <>
Cc: <>
Closes: mesa/mesa#2350

Reviewed-by: Caio Marcelo de Oliveira Filho's avatarCaio Marcelo de Oliveira Filho <>
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <>
Tested-by: Marge Bot <mesa/mesa!3387>
Part-of: <mesa/mesa!3387>
parent d8e05edb
......@@ -513,7 +513,9 @@ VkResult genX(CreateSampler)(
.ChromaKeyEnable = 0,
.ChromaKeyIndex = 0,
.ChromaKeyMode = 0,
.ShadowFunction = vk_to_gen_shadow_compare_op[pCreateInfo->compareOp],
.ShadowFunction =
vk_to_gen_shadow_compare_op[pCreateInfo->compareEnable ?
pCreateInfo->compareOp : VK_COMPARE_OP_NEVER],
.CubeSurfaceControlMode = OVERRIDE,
.BorderColorPointer = border_color_offset,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment