From 53b83899e084f121a35c75539ad9888d5641ec59 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 22 Jan 2016 16:34:13 -0800 Subject: [PATCH] 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. --- src/vulkan/gen7_state.c | 2 +- src/vulkan/gen8_state.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, -- 2.30.2