[Mesa-dev] [RFC PATCH 31/40] i965/fs: Set limitation for amount of UBO push constant entries
Abdiel Janulgue
abdiel.janulgue at linux.intel.com
Sun Jan 4 06:04:45 PST 2015
We set the same 16-register limitation used in assign_constant_locations()
when assigning UBOs as push constants. Otherwise, just fall-back to using
pull constant loads.
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index c0499b6..8e092fb 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -1083,7 +1083,8 @@ fs_visitor::visit(ir_expression *ir)
*/
bool use_gather = (brw->has_resource_streamer && brw->use_gather_constants);
int param_index = uniforms + ubo_uniforms;
- if (use_gather && const_uniform_block && const_offset) {
+ if (use_gather && const_uniform_block && const_offset &&
+ (param_index < 128)) {
fs_reg reg(UNIFORM, param_index);
reg.type = brw_type_for_base_type(ir->type);
--
1.9.1
More information about the mesa-dev
mailing list