diff options
author | Jason Ekstrand <[email protected]> | 2017-09-28 22:16:55 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-10-12 22:39:30 -0700 |
commit | 4efd079aba165d5a046868ec77a27605724da858 (patch) | |
tree | 96e71c5bab325d158d4c7ffbf084cd2dc136c651 /src/intel/compiler/brw_fs.cpp | |
parent | 9df64b56663c3ffaee081aa608db9e5163a4eeae (diff) |
intel/compiler: Add a flag for pull constant support
The Vulkan driver does not support pull constants. It simply limits
things such that we can always push everything. Previously, we were
determining whether or not to push things based on whether or not the
prog_data::pull_param array is non-null. This is rather hackish and
about to stop working.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_fs.cpp')
-rw-r--r-- | src/intel/compiler/brw_fs.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |