From b299ded02eccfa94aede65086bd1ad254aaa5180 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 21 Aug 2017 18:42:41 -0700 Subject: intel/fs: use pull constant locations to check for first compile of a shader 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. Reviewed-by: Iago Toral Quiroga --- src/intel/compiler/brw_fs_nir.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/intel/compiler/brw_fs_nir.cpp') diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp index 628d7b00c54..04b6e5119a2 100644 --- a/src/intel/compiler/brw_fs_nir.cpp +++ b/src/intel/compiler/brw_fs_nir.cpp @@ -81,8 +81,11 @@ fs_visitor::nir_setup_outputs() void fs_visitor::nir_setup_uniforms() { - if (dispatch_width != min_dispatch_width) + /* Only the first compile gets to set up uniforms. */ + if (push_constant_loc) { + assert(pull_constant_loc); return; + } uniforms = nir->num_uniforms / 4; } -- cgit v1.2.3