[Mesa-dev] [PATCH 1/7] anv: Fix border colors with normalized formats on gen7/gen75
Lionel Landwerlin
llandwerlin at gmail.com
Mon Nov 21 17:47:34 UTC 2016
This replicates the following commit from our GL driver :
commit c25e5300cba7628b58df93ead14ebc3cc32f338c
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Jan 20 03:33:40 2012 -0800
i965: Fix border color on Sandybridge and Ivybridge.
On Haswell, it fixes:
dEQP-VK.pipeline.sampler.view_type.*.format.*_unorm.address_modes.all_mode_clamp_to_border_*
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/vulkan/genX_cmd_buffer.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index fff0ba0..69c1ce9 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -106,6 +106,15 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer)
sba.IndirectObjectBufferSizeModifyEnable = true;
sba.InstructionBufferSize = 0xfffff;
sba.InstructionBuffersizeModifyEnable = true;
+# else
+ /* Dynamic state upper bound. Although the documentation says that
+ * programming it to zero will cause it to be ignored, that is a lie. If
+ * this isn't programmed to a real bound, the sampler border color
+ * pointer is rejected, causing border color to mysteriously fail.
+ */
+ sba.DynamicStateAccessUpperBound =
+ (struct anv_address) { NULL, 0xfffff000 };
+ sba.DynamicStateAccessUpperBoundModifyEnable = true;
# endif
}
--
2.10.2
More information about the mesa-dev
mailing list