[Mesa-dev] [PATCH 8/9] i965/fs: Handle !supports_pull_constants and push UBOs properly

Jason Ekstrand jason at jlekstrand.net
Thu Dec 7 04:34:26 UTC 2017


In Vulkan, we don't support classic pull constants and everything the
client asks us to push, we push.  However, for pushed UBOs, we still
want to fall back to conventional pulls if we run out of space.
---
 src/intel/compiler/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 41260b4..200b77b 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -2144,7 +2144,7 @@ fs_visitor::assign_constant_locations()
 
       unsigned push_start_align = cplx_align_apply(align, num_push_constants);
       unsigned chunk_size = u - chunk_start + 1;
-      if (!compiler->supports_pull_constants ||
+      if ((!compiler->supports_pull_constants && u < UBO_START) ||
           (chunk_size < max_chunk_size &&
            push_start_align + chunk_size <= max_push_components)) {
          /* Align up the number of push constants */
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list