aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-05-12 22:55:30 -0500
committerMarge Bot <[email protected]>2020-05-14 00:34:47 +0000
commit0b5288492b90c9a5471152393df31691271f6a55 (patch)
tree324bce0c2fecc2d4b091d85f6fb8878c442bae34 /src/intel/vulkan
parente3d8edf3e08988b19c6861040b9ed4afa8ca5ec2 (diff)
anv: Set MOCS in 3DSTATE_CONSTANT_* on Gen9+
While we're here, we add a nice detailed comment about why always assuming internal is ok. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index f1b102c9805..ca67bb8b5f2 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3029,7 +3029,21 @@ cmd_buffer_emit_push_constant(struct anv_cmd_buffer *cmd_buffer,
const struct anv_pipeline_bind_map *bind_map =
&pipeline->shaders[stage]->bind_map;
-#if GEN_GEN >= 12
+#if GEN_GEN >= 9
+ /* This field exists since Gen8. However, the Broadwell PRM says:
+ *
+ * "Constant Buffer Object Control State must be always programmed
+ * to zero."
+ *
+ * This restriction does not exist on any newer platforms.
+ *
+ * We only have one MOCS field for the whole packet, not one per
+ * buffer. We could go out of our way here to walk over all of the
+ * buffers and see if any of them are used externally and use the
+ * external MOCS. However, the notion that someone would use the
+ * same bit of memory for both scanout and a UBO is nuts. Let's not
+ * bother and assume it's all internal.
+ */
c.MOCS = cmd_buffer->device->isl_dev.mocs.internal;
#endif