summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/compiler')
-rw-r--r--src/intel/compiler/brw_compiler.h6
-rw-r--r--src/intel/compiler/brw_fs.cpp5
-rw-r--r--src/intel/compiler/brw_vec4_visitor.cpp2
3 files changed, 11 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
index 94fe63e46f1..26e8f464ef6 100644
--- a/src/intel/compiler/brw_compiler.h
+++ b/src/intel/compiler/brw_compiler.h
@@ -105,6 +105,12 @@ struct brw_compiler {
* Base Address? (If not, it's a normal GPU address.)
*/
bool constant_buffer_0_is_relative;
+
+ /**
+ * Whether or not the driver supports pull constants. If not, the compiler
+ * will attempt to push everything.
+ */
+ bool supports_pull_constants;
};
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index c1d67750a3a..6f5f21ddcdf 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -1889,6 +1889,7 @@ set_push_pull_constant_loc(unsigned uniform, int *chunk_start,
unsigned *num_pull_constants,
const unsigned max_push_components,
const unsigned max_chunk_size,
+ bool allow_pull_constants,
struct brw_stage_prog_data *stage_prog_data)
{
/* This is the first live uniform in the chunk */
@@ -1918,7 +1919,7 @@ set_push_pull_constant_loc(unsigned uniform, int *chunk_start,
* Vulkan driver, push constants are explicitly exposed via the API
* so we push everything. In GL, we only push small arrays.
*/
- if (stage_prog_data->pull_param == NULL ||
+ if (!allow_pull_constants ||
(*num_push_constants + chunk_size <= max_push_components &&
chunk_size <= max_chunk_size)) {
assert(*num_push_constants + chunk_size <= max_push_components);
@@ -2054,6 +2055,7 @@ fs_visitor::assign_constant_locations()
push_constant_loc, pull_constant_loc,
&num_push_constants, &num_pull_constants,
max_push_components, max_chunk_size,
+ compiler->supports_pull_constants,
stage_prog_data);
}
@@ -2074,6 +2076,7 @@ fs_visitor::assign_constant_locations()
push_constant_loc, pull_constant_loc,
&num_push_constants, &num_pull_constants,
max_push_components, max_chunk_size,
+ compiler->supports_pull_constants,
stage_prog_data);
}
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp b/src/intel/compiler/brw_vec4_visitor.cpp
index 88e80aaa3af..ff5cd2d4334 100644
--- a/src/intel/compiler/brw_vec4_visitor.cpp
+++ b/src/intel/compiler/brw_vec4_visitor.cpp
@@ -1777,7 +1777,7 @@ vec4_visitor::move_uniform_array_access_to_pull_constants()
/* The vulkan dirver doesn't support pull constants other than UBOs so
* everything has to be pushed regardless.
*/
- if (stage_prog_data->pull_param == NULL) {
+ if (!compiler->supports_pull_constants) {
split_uniform_registers();
return;
}