[Mesa-dev] [PATCH 12/44] intel/fs: Assign constant locations if they haven't been assigned
Jason Ekstrand
jason at jlekstrand.net
Tue Sep 5 15:13:04 UTC 2017
Before, we bailing in assign_constant_locations based on the minimum
dispatch size. The more direct thing to do is simply to check for
whether or not we have constant locations and bail if we do. For
nir_setup_uniforms, it's completely safe to do it multiple times because
we just copy a value from the NIR shader.
---
src/intel/compiler/brw_fs.cpp | 4 +++-
src/intel/compiler/brw_fs_nir.cpp | 3 ---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index f29e47c..0004402 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -1948,8 +1948,10 @@ void
fs_visitor::assign_constant_locations()
{
/* Only the first compile gets to decide on locations. */
- if (dispatch_width != min_dispatch_width)
+ if (push_constant_loc) {
+ assert(pull_constant_loc);
return;
+ }
bool is_live[uniforms];
memset(is_live, 0, sizeof(is_live));
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index aa4ca02..c2148c3 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -68,9 +68,6 @@ fs_visitor::nir_setup_outputs()
void
fs_visitor::nir_setup_uniforms()
{
- if (dispatch_width != min_dispatch_width)
- return;
-
uniforms = nir->num_uniforms / 4;
}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list