summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-06-29 08:41:11 +0200
committerSamuel Iglesias Gonsálvez <[email protected]>2017-01-03 11:26:51 +0100
commit10694be522cfc408dbbe3de3321be59c491408f6 (patch)
tree95f0592947080a56d4a7789ecead7ff1ca1a1679 /src/mesa
parent52fb22b64678b1dc855cffc9998103b31890a0c5 (diff)
i965/vec4: fix move_uniform_array_access_to_pull_constant() for 64-bit data
v2: adapt to changes in offset() Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 2d0822b5a5a..9d7afb56f2d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1801,8 +1801,24 @@ vec4_visitor::move_uniform_array_access_to_pull_constants()
assert(inst->src[0].swizzle == BRW_SWIZZLE_NOOP);
- emit_pull_constant_load(block, inst, inst->dst, inst->src[0],
- pull_constant_loc[uniform_nr], inst->src[1]);
+ if (type_sz(inst->src[0].type) != 8) {
+ emit_pull_constant_load(block, inst, inst->dst, inst->src[0],
+ pull_constant_loc[uniform_nr], inst->src[1]);
+ } else {
+ dst_reg shuffled = dst_reg(this, glsl_type::dvec4_type);
+ dst_reg shuffled_float = retype(shuffled, BRW_REGISTER_TYPE_F);
+
+ emit_pull_constant_load(block, inst, shuffled_float, inst->src[0],
+ pull_constant_loc[uniform_nr], inst->src[1]);
+ emit_pull_constant_load(block, inst,
+ offset(shuffled_float, 8, 1),
+ offset(inst->src[0], 8, 1),
+ pull_constant_loc[uniform_nr], inst->src[1]);
+
+ shuffle_64bit_data(retype(inst->dst, BRW_REGISTER_TYPE_DF),
+ src_reg(shuffled), false, block, inst);
+ }
+
inst->remove(block);
}