[Mesa-dev] [RFC PATCH 36/40] i965/fs: Make SIMD16 work for UBO gather push constants
Abdiel Janulgue
abdiel.janulgue at linux.intel.com
Sun Jan 4 06:04:50 PST 2015
Gather table entries were generated previously in the SIMD8 pass.
Just reuse those entries for SIMD16 so we don't generate a duplicate
set of registers.
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 597e125..18626af 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -1086,6 +1086,19 @@ fs_visitor::visit(ir_expression *ir)
if (use_gather && const_uniform_block && const_offset &&
(param_index < 128)) {
+ if (dispatch_width == 16) {
+ for (int i = 0; i < (int) stage_prog_data->nr_gather_table; i++) {
+ if ((stage_prog_data->gather_table[i].const_block ==
+ const_uniform_block->value.u[0]) &&
+ (stage_prog_data->gather_table[i].const_offset ==
+ const_offset->value.u[0])) {
+ fs_reg reg(UNIFORM, stage_prog_data->gather_table[i].reg);
+ result = reg;
+ return;
+ }
+ }
+ }
+
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