From: Jason Ekstrand Date: Sat, 23 Jan 2016 00:34:13 +0000 (-0800) Subject: genX/state: Set CubeSurfaceControlMode to OVERRIDE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53b83899e084f121a35c75539ad9888d5641ec59;p=mesa.git genX/state: Set CubeSurfaceControlMode to OVERRIDE This makes it act like the address mode is set to TEXCOORDMODE_CUBE whenever this sampler is combined with a cube surface. This *should* be what we need for Vulkan. Interestingly, the PRM contains a programming note for this field that says simply, "This field must be set to CUBECTRLMODE_PROGRAMMED". However, emprical evidence suggests that it does what the PRM says it does and OVERRIDE is just fine. --- diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 1f829be9121..eff5dd20eb7 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -100,7 +100,7 @@ VkResult genX(CreateSampler)( .ChromaKeyIndex = 0, .ChromaKeyMode = 0, .ShadowFunction = vk_to_gen_compare_op[pCreateInfo->compareOp], - .CubeSurfaceControlMode = 0, + .CubeSurfaceControlMode = OVERRIDE, .BorderColorPointer = device->border_colors.offset + diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 3c9d15257a3..9d56ecd1845 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -357,7 +357,7 @@ VkResult genX(CreateSampler)( .ChromaKeyIndex = 0, .ChromaKeyMode = 0, .ShadowFunction = vk_to_gen_compare_op[pCreateInfo->compareOp], - .CubeSurfaceControlMode = 0, + .CubeSurfaceControlMode = OVERRIDE, .IndirectStatePointer = border_color_offset >> 6,