[Mesa-dev] [PATCH 12/15] i965: abort linking if URB read length greater than 15
Antia Puentes
apuentes at igalia.com
Thu Apr 28 11:40:42 UTC 2016
From: "Juan A. Suarez Romero" <jasuarez at igalia.com>
In scalar mode, URB read length limit is 15. Abort if we go beyond it.
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 9816f0d..04287fb 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -2148,6 +2148,14 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
prog_data->base.urb_read_length =
DIV_ROUND_UP(MAX2(nr_attribute_slots, 1), 2);
+ if (is_scalar && prog_data->base.urb_read_length > 15) {
+ if (error_str)
+ *error_str = ralloc_strdup(mem_ctx,
+ "Too many attributes. Try to reduce the "
+ "number of attributes or their size");
+ return NULL;
+ }
+
prog_data->nr_attributes = nr_attributes;
prog_data->nr_attribute_slots = nr_attribute_slots;
--
2.5.0
More information about the mesa-dev
mailing list